From 6d1ccaa7a48f19ab41e0ca31502fc73105e9ecd4 Mon Sep 17 00:00:00 2001 From: antoine Date: Tue, 23 Sep 2014 19:10:51 +0200 Subject: [PATCH] Renames Tuning to canvasdesigner (code and comments) --- src/Umbraco.Web.UI.Client/gruntFile.js | 22 +- .../canvasdesigner.controller.js | 76 +- .../canvasdesigner/canvasdesigner.front.js | 92 +- .../canvasdesigner/canvasdesigner.global.js | 20 +- .../config/canvasdesigner.config.js | 4 +- .../config/canvasdesigner.editors.js | 1444 ----------------- .../config/canvasdesigner.palettes.js | 4 +- .../canvasdesigner/editors/background.html | 8 +- .../src/canvasdesigner/editors/background.js | 2 +- .../editors/googlefontpicker.html | 4 +- .../src/canvasdesigner/editors/gridRow.js | 2 +- .../editors/layout.html | 2 +- .../editors/layout.js | 6 +- .../editors/layout.less | 0 .../src/canvasdesigner/index.html | 29 +- ...r.panelStyles.less => canvasdesigner.less} | 84 +- src/Umbraco.Web/CanvasDesignerUtility.cs | 22 +- src/Umbraco.Web/UmbracoHelper.cs | 14 +- 18 files changed, 192 insertions(+), 1643 deletions(-) delete mode 100644 src/Umbraco.Web.UI.Client/src/canvasdesigner/config/canvasdesigner.editors.js rename src/Umbraco.Web.UI.Client/src/{tuning => canvasdesigner}/editors/layout.html (84%) rename src/Umbraco.Web.UI.Client/src/{tuning => canvasdesigner}/editors/layout.js (73%) rename src/Umbraco.Web.UI.Client/src/{tuning => canvasdesigner}/editors/layout.less (100%) rename src/Umbraco.Web.UI.Client/src/less/{canvasdesigner.panelStyles.less => canvasdesigner.less} (91%) diff --git a/src/Umbraco.Web.UI.Client/gruntFile.js b/src/Umbraco.Web.UI.Client/gruntFile.js index ca289bbb55..dcba21e97b 100644 --- a/src/Umbraco.Web.UI.Client/gruntFile.js +++ b/src/Umbraco.Web.UI.Client/gruntFile.js @@ -9,16 +9,16 @@ module.exports = function (grunt) { //TODO: Too much watching, this brings windows to it's knees when in dev mode //run by the watch task - grunt.registerTask('watch-js', ['jshint:dev','concat','copy:app','copy:mocks','copy:packages','copy:tuning','copy:vs', 'karma:unit']); - grunt.registerTask('watch-less', ['recess:build', 'recess:installer', 'recess:tuning','copy:tuning', 'copy:assets', 'copy:vs']); + grunt.registerTask('watch-js', ['jshint:dev','concat','copy:app','copy:mocks','copy:packages','copy:canvasdesigner','copy:vs', 'karma:unit']); + grunt.registerTask('watch-less', ['recess:build', 'recess:installer', 'recess:canvasdesigner','copy:canvasdesigner', 'copy:assets', 'copy:vs']); grunt.registerTask('watch-html', ['copy:views', 'copy:vs']); grunt.registerTask('watch-packages', ['copy:packages']); grunt.registerTask('watch-installer', ['concat:install', 'concat:installJs', 'copy:installer', 'copy:vs']); - grunt.registerTask('watch-tuning', ['copy:tuning', 'concat:tuningJs', 'copy:vs']); + grunt.registerTask('watch-canvasdesigner', ['copy:canvasdesigner', 'concat:canvasdesignerJs', 'copy:vs']); grunt.registerTask('watch-test', ['jshint:dev', 'karma:unit']); //triggered from grunt dev or grunt - grunt.registerTask('build', ['clean', 'concat', 'recess:min', 'recess:installer', 'recess:tuning', 'bower', 'copy']); + grunt.registerTask('build', ['clean', 'concat', 'recess:min', 'recess:installer', 'recess:canvasdesigner', 'bower', 'copy']); //build-dev doesn't min - we are trying to speed this up and we don't want minified stuff when we are in dev mode grunt.registerTask('build-dev', ['clean', 'concat', 'recess:build', 'recess:installer', 'copy']); @@ -158,7 +158,7 @@ module.exports = function (grunt) { files: [{ dest: '<%= distdir %>/views/install', src : '**/*.html', expand: true, cwd: 'src/installer/steps' }] }, - tuning: { + canvasdesigner: { files: [ { dest: '<%= distdir %>/preview', src: '**/*.html', expand: true, cwd: 'src/canvasdesigner' }, { dest: '<%= distdir %>/preview/editors', src: '**/*.html', expand: true, cwd: 'src/canvasdesigner/editors' }, @@ -229,7 +229,7 @@ module.exports = function (grunt) { footer: "\n\n})();" } }, - tuningJs: { + canvasdesignerJs: { src: ['src/canvasdesigner/canvasdesigner.global.js', 'src/canvasdesigner/canvasdesigner.controller.js', 'src/canvasdesigner/editors/*.js', 'src/canvasdesigner/lib/*.js'], dest: '<%= distdir %>/js/canvasdesigner.panel.js' }, @@ -319,10 +319,10 @@ module.exports = function (grunt) { compile: true } }, - tuning: { + canvasdesigner: { files: { - '<%= distdir %>/assets/css/canvasdesigner.panelStyles.css': - ['src/less/canvasdesigner.panelStyles.less', 'src/less/helveticons.less'] + '<%= distdir %>/assets/css/canvasdesigner.css': + ['src/less/canvasdesigner.less', 'src/less/helveticons.less'] }, options: { compile: true @@ -360,9 +360,9 @@ module.exports = function (grunt) { files: ['src/installer/**/*.*'], tasks: ['watch-installer', 'timestamp'], }, - tuning: { + canvasdesigner: { files: ['src/canvasdesigner/**/*.*'], - tasks: ['watch-tuning', 'timestamp'], + tasks: ['watch-canvasdesigner', 'timestamp'], }, html: { files: ['src/views/**/*.html', 'src/*.html'], diff --git a/src/Umbraco.Web.UI.Client/src/canvasdesigner/canvasdesigner.controller.js b/src/Umbraco.Web.UI.Client/src/canvasdesigner/canvasdesigner.controller.js index 711d32f8f5..bb77fc3018 100644 --- a/src/Umbraco.Web.UI.Client/src/canvasdesigner/canvasdesigner.controller.js +++ b/src/Umbraco.Web.UI.Client/src/canvasdesigner/canvasdesigner.controller.js @@ -1,6 +1,6 @@ /*********************************************************************************************************/ -/* tuning panel app and controller */ +/* Canvasdesigner panel app and controller */ /*********************************************************************************************************/ var app = angular.module("Umbraco.canvasdesigner", ['spectrumcolorpicker', 'ui.slider', 'umbraco.resources', 'umbraco.services']) @@ -9,9 +9,7 @@ var app = angular.module("Umbraco.canvasdesigner", ['spectrumcolorpicker', 'ui.s $scope.isOpen = false; $scope.frameLoaded = false; - $scope.enableTuning = 0; - //$scope.schemaFocus = "body"; - //$scope.settingIsOpen = 'previewDevice'; + $scope.enableCanvasdesigner = 0; $scope.googleFontFamilies = {}; $scope.pageId = $location.search().id; $scope.pageUrl = "../dialogs/Preview.aspx?id=" + $location.search().id; @@ -26,7 +24,7 @@ var app = angular.module("Umbraco.canvasdesigner", ['spectrumcolorpicker', 'ui.s ]; $scope.previewDevice = $scope.devices[0]; - var apiController = "/Umbraco/Api/CanvasDesigner/"; + var apiController = "/Umbraco/Api/Canvasdesigner/"; /*****************************************************************************/ /* Preview devices */ @@ -41,12 +39,12 @@ var app = angular.module("Umbraco.canvasdesigner", ['spectrumcolorpicker', 'ui.s /* UI designer managment */ /*****************************************************************************/ - // Update all tuningConfig's values from data + // Update all Canvasdesigner config's values from data var updateConfigValue = function (data) { var fonts = []; - $.each($scope.tuningModel.configs, function (indexConfig, config) { + $.each($scope.canvasdesignerModel.configs, function (indexConfig, config) { if (config.editors) { $.each(config.editors, function (indexItem, item) { @@ -93,8 +91,8 @@ var app = angular.module("Umbraco.canvasdesigner", ['spectrumcolorpicker', 'ui.s }; - // Load parameters from GetLessParameters and init data of the tuning config - $scope.initTuning = function () { + // Load parameters from GetLessParameters and init data of the Canvasdesigner config + $scope.initCanvasdesigner = function () { $http.get(apiController + 'Load', { params: { pageId: $scope.pageId } }) .success(function (data) { @@ -109,14 +107,14 @@ var app = angular.module("Umbraco.canvasdesigner", ['spectrumcolorpicker', 'ui.s }; - // Refresh all less parameters for every changes watching tuningModel - var refreshtuning = function () { + // Refresh all less parameters for every changes watching canvasdesignerModel + var refreshCanvasdesigner = function () { var parameters = []; - if ($scope.tuningModel) { + if ($scope.canvasdesignerModel) { - angular.forEach($scope.tuningModel.configs, function (config, indexConfig) { + angular.forEach($scope.canvasdesignerModel.configs, function (config, indexConfig) { // Get currrent selected element // TODO @@ -164,11 +162,11 @@ var app = angular.module("Umbraco.canvasdesigner", ['spectrumcolorpicker', 'ui.s $scope.saveLessParameters(true); } - // Save all parameter in tuningParameters.less file + // Save all parameter in CanvasdesignerParameters.less file $scope.saveLessParameters = function (inherited) { var parameters = []; - $.each($scope.tuningModel.configs, function (indexConfig, config) { + $.each($scope.canvasdesignerModel.configs, function (indexConfig, config) { if (config.editors) { $.each(config.editors, function (indexItem, item) { @@ -211,12 +209,12 @@ var app = angular.module("Umbraco.canvasdesigner", ['spectrumcolorpicker', 'ui.s } - // Delete current page tuning - $scope.deleteTuning = function () { + // Delete current page Canvasdesigner + $scope.deleteCanvasdesigner = function () { $('.btn-default-delete').attr("disabled", true); $http.get(apiController + 'Delete', { params: { pageId: $scope.pageId } }) .success(function (data) { - $scope.enableTuning++; + $scope.enableCanvasdesigner++; $scope.pageUrl = $scope.pageUrl + "&n=123456"; $('.btn-default-delete').attr("disabled", false); }) @@ -227,17 +225,17 @@ var app = angular.module("Umbraco.canvasdesigner", ['spectrumcolorpicker', 'ui.s /* Preset design */ /*****************************************************************************/ - // Refresh with selected tuning palette - $scope.refreshtuningByPalette = function (palette) { + // Refresh with selected Canvasdesigner palette + $scope.refreshCanvasdesignerByPalette = function (palette) { updateConfigValue(palette.data); - refreshtuning(); + refreshCanvasdesigner(); }; // Hidden botton to make preset from the current settings $scope.makePreset = function () { var parameters = []; - $.each($scope.tuningModel.configs, function (indexConfig, config) { + $.each($scope.canvasdesignerModel.configs, function (indexConfig, config) { if (config.editors) { $.each(config.editors, function (indexItem, item) { if (item.values) { @@ -262,27 +260,27 @@ var app = angular.module("Umbraco.canvasdesigner", ['spectrumcolorpicker', 'ui.s $scope.openPreviewDevice = function () { $scope.showDevicesPreview = true; - $scope.closeIntelTuning(); + $scope.closeIntelCanvasdesigner(); } $scope.closePreviewDevice = function(){ $scope.showDevicesPreview = false; if ($scope.showStyleEditor) { - $scope.openIntelTuning(); + $scope.openIntelCanvasdesigner(); } } $scope.openPalettePicker = function () { $scope.showPalettePicker = true; $scope.showStyleEditor = false; - $scope.closeIntelTuning(); + $scope.closeIntelCanvasdesigner(); }; $scope.openStyleEditor = function () { $scope.showStyleEditor = true; $scope.showPalettePicker = false; $scope.outlineSelectedHide() - $scope.openIntelTuning() + $scope.openIntelCanvasdesigner() } // Remove value from field @@ -363,14 +361,14 @@ var app = angular.module("Umbraco.canvasdesigner", ['spectrumcolorpicker', 'ui.s iframe.document.getElementById("umbracoPreviewBadge").style.display = "none"; }; - $scope.openIntelTuning = function () { - if (document.getElementById("resultFrame").contentWindow.initIntelTuning) - document.getElementById("resultFrame").contentWindow.initIntelTuning($scope.tuningModel); + $scope.openIntelCanvasdesigner = function () { + if (document.getElementById("resultFrame").contentWindow.initIntelCanvasdesigner) + document.getElementById("resultFrame").contentWindow.initIntelCanvasdesigner($scope.canvasdesignerModel); }; - $scope.closeIntelTuning = function () { - if (document.getElementById("resultFrame").contentWindow.closeIntelTuning) - document.getElementById("resultFrame").contentWindow.closeIntelTuning($scope.tuningModel); + $scope.closeIntelCanvasdesigner = function () { + if (document.getElementById("resultFrame").contentWindow.closeIntelCanvasdesigner) + document.getElementById("resultFrame").contentWindow.closeIntelCanvasdesigner($scope.canvasdesignerModel); $scope.outlineSelectedHide(); }; @@ -397,8 +395,6 @@ var app = angular.module("Umbraco.canvasdesigner", ['spectrumcolorpicker', 'ui.s document.getElementById("resultFrame").contentWindow.outlinePositionHide(); } - - /*****************************************************************************/ /* Google font loader, TODO: put together from directive, front and back */ /*****************************************************************************/ @@ -443,19 +439,19 @@ var app = angular.module("Umbraco.canvasdesigner", ['spectrumcolorpicker', 'ui.s $scope.googleFontFamilies = data; }); - // watch framLoaded, only if iframe page have EnableTuning() - $scope.$watch("enableTuning", function () { + // watch framLoaded, only if iframe page have enableCanvasdesigner() + $scope.$watch("enableCanvasdesigner", function () { $timeout(function () { - if ($scope.enableTuning > 0) { + if ($scope.enableCanvasdesigner > 0) { $scope.$watch('ngRepeatFinished', function (ngRepeatFinishedEvent) { $timeout(function () { - $scope.initTuning(); + $scope.initCanvasdesigner(); }, 200); }); - $scope.$watch('tuningModel', function () { - refreshtuning(); + $scope.$watch('canvasdesignerModel', function () { + refreshCanvasdesigner(); }, true); } diff --git a/src/Umbraco.Web.UI.Client/src/canvasdesigner/canvasdesigner.front.js b/src/Umbraco.Web.UI.Client/src/canvasdesigner/canvasdesigner.front.js index 41e1e46418..19fd9f6569 100644 --- a/src/Umbraco.Web.UI.Client/src/canvasdesigner/canvasdesigner.front.js +++ b/src/Umbraco.Web.UI.Client/src/canvasdesigner/canvasdesigner.front.js @@ -13,7 +13,7 @@ var refrechLayout = function (parameters) { eval(string); } -/* Fonts loaded in the tuning panel need to be loaded independently in +/* Fonts loaded in the Canvasdesigner panel need to be loaded independently in * the content iframe to allow live previewing. */ var webFontScriptLoaded = false; @@ -47,14 +47,14 @@ var getFont = function (font) { } } -var closeIntelTuning = function (tuningModel) { +var closeIntelCanvasdesigner = function (canvasdesignerModel) { - if (tuningModel) { + if (canvasdesignerModel) { - $.each(tuningModel.configs, function (indexConfig, config) { + $.each(canvasdesignerModel.configs, function (indexConfig, config) { if (config.schema) { $(config.schema).unbind(); - $(config.schema).removeAttr("tuning-over"); + $(config.schema).removeAttr("canvasdesigner-over"); } }); @@ -72,41 +72,41 @@ var initBodyClickEvent = function () { }); } -var initIntelTuning = function (tuningModel) { +var initIntelCanvasdesigner = function (canvasdesignerModel) { - if (tuningModel) { + if (canvasdesignerModel) { - // Add tuning-over attr for each schema from config - $.each(tuningModel.configs, function (indexConfig, config) { + // Add canvasdesigner-over attr for each schema from config + $.each(canvasdesignerModel.configs, function (indexConfig, config) { var schema = config.selector ? config.selector : config.schema; if (schema) { - $(schema).attr("tuning-over", config.name); + $(schema).attr("canvasdesigner-over", config.name); $(schema).css("cursor", "default"); } }); - // Outline tuning-over + // Outline canvasdesigner-over $(document).mousemove(function (e) { e.stopPropagation(); var target = $(e.target); - while (target.length > 0 && (target.attr('tuning-over') == undefined || target.attr('tuning-over') == '')) { + while (target.length > 0 && (target.attr('canvasdesigner-over') == undefined || target.attr('canvasdesigner-over') == '')) { target = target.parent(); } - if (target.attr('tuning-over') != undefined && target.attr('tuning-over') != '') { + if (target.attr('canvasdesigner-over') != undefined && target.attr('canvasdesigner-over') != '') { target.unbind(); outlinePosition(target); target.click(function (e) { e.stopPropagation(); e.preventDefault(); - //console.info(target.attr('tuning-over')); + //console.info(target.attr('canvasdesigner-over')); currentTarget = target; outlineSelected(); - parent.refrechIntelTuning(target.attr('tuning-over'), target); + parent.refrechIntelCanvasdesigner(target.attr('canvasdesigner-over'), target); return false; }); } @@ -127,7 +127,7 @@ var outlinePosition = function (oTarget) { var target = oTarget; - if (target.length > 0 && target.attr('tuning-over') != undefined && target.attr('tuning-over') != '') { + if (target.length > 0 && target.attr('canvasdesigner-over') != undefined && target.attr('canvasdesigner-over') != '') { var localname = target[0].localName; var height = $(target).outerHeight(); @@ -138,14 +138,14 @@ var outlinePosition = function (oTarget) { var posX = position.left; //+ $(window).scrollLeft(); - $(".tuning-overlay").css('display', 'block'); - $(".tuning-overlay").css('left', posX); - $(".tuning-overlay").css('top', posY); - $(".tuning-overlay").css('width', width + "px"); - $(".tuning-overlay").css('height', height + "px"); + $(".canvasdesigner-overlay").css('display', 'block'); + $(".canvasdesigner-overlay").css('left', posX); + $(".canvasdesigner-overlay").css('top', posY); + $(".canvasdesigner-overlay").css('width', width + "px"); + $(".canvasdesigner-overlay").css('height', height + "px"); //console.info("element select " + localname); - $(".tuning-overlay span").html(target.attr('tuning-over')); + $(".canvasdesigner-overlay span").html(target.attr('canvasdesigner-over')); } else { @@ -167,7 +167,7 @@ var outlineSelected = function (oTarget) { target = oTarget; } - if (target && target.length > 0 && target.attr('tuning-over') != undefined && target.attr('tuning-over') != '') { + if (target && target.length > 0 && target.attr('canvasdesigner-over') != undefined && target.attr('canvasdesigner-over') != '') { var localname = target[0].localName; var height = $(target).outerHeight(); @@ -178,14 +178,14 @@ var outlineSelected = function (oTarget) { var posX = position.left; //+ $(window).scrollLeft(); - $(".tuning-overlay-selected").css('display', 'block'); - $(".tuning-overlay-selected").css('left', posX); - $(".tuning-overlay-selected").css('top', posY); - $(".tuning-overlay-selected").css('width', width + "px"); - $(".tuning-overlay-selected").css('height', height + "px"); + $(".canvasdesigner-overlay-selected").css('display', 'block'); + $(".canvasdesigner-overlay-selected").css('left', posX); + $(".canvasdesigner-overlay-selected").css('top', posY); + $(".canvasdesigner-overlay-selected").css('width', width + "px"); + $(".canvasdesigner-overlay-selected").css('height', height + "px"); //console.info("element select " + localname); - $(".tuning-overlay-selected span").html(target.attr('tuning-over')); + $(".canvasdesigner-overlay-selected span").html(target.attr('canvasdesigner-over')); } else { @@ -196,28 +196,28 @@ var outlineSelected = function (oTarget) { } var outlinePositionHide = function () { - $(".tuning-overlay").css('display', "none"); + $(".canvasdesigner-overlay").css('display', "none"); } var outlineSelectedHide = function () { currentTarget = undefined; - $(".tuning-overlay-selected").css('display', "none"); + $(".canvasdesigner-overlay-selected").css('display', "none"); } -var initTuningPanel = function () { +var initCanvasdesignerPanel = function () { - // First load the tuning config from file - if (!tuningConfig) { - console.info("tuning config not found"); + // First load the canvasdesigner config from file + if (!canvasdesignerConfig) { + console.info("canvasdesigner config not found"); } - // Add tuning from HTML 5 data tags - $("[data-tuning]").each(function (index, value) { - var tagName = $(value).data("tuning") ? $(value).data("tuning") : $(value)[0].nodeName.toLowerCase(); + // Add canvasdesigner from HTML 5 data tags + $("[data-canvasdesigner]").each(function (index, value) { + var tagName = $(value).data("canvasdesigner") ? $(value).data("canvasdesigner") : $(value)[0].nodeName.toLowerCase(); var tagSchema = $(value).data("schema") ? $(value).data("schema") : $(value)[0].nodeName.toLowerCase(); var tagSelector = $(value).data("selector") ? $(value).data("selector") : tagSchema; var tagEditors = $(value).data("editors"); //JSON.parse(...); - tuningConfig.configs.splice(tuningConfig.configs.length, 0, { + canvasdesignerConfig.configs.splice(canvasdesignerConfig.configs.length, 0, { name: tagName, schema: tagSchema, selector: tagSelector, @@ -226,7 +226,7 @@ var initTuningPanel = function () { }); // For each editor config create a composite alias - $.each(tuningConfig.configs, function (configIndex, config) { + $.each(canvasdesignerConfig.configs, function (configIndex, config) { if (config.editors) { $.each(config.editors, function (editorIndex, editor) { var clearSchema = config.schema.replace(/[^a-zA-Z0-9]+/g, '').toLowerCase(); @@ -245,7 +245,7 @@ var initTuningPanel = function () { alert(err.responseText) }, data: { - config: JSON.stringify(tuningConfig), + config: JSON.stringify(canvasdesignerConfig), pageId: pageId }, success: function (data) { @@ -265,7 +265,7 @@ var initTuningPanel = function () { // Init panel if (parent.setFrameIsLoaded) { - parent.setFrameIsLoaded(tuningConfig, tuningPalette); + parent.setFrameIsLoaded(canvasdesignerConfig, canvasdesignerPalette); } }); } @@ -278,14 +278,14 @@ $(function () { if (parent.setFrameIsLoaded) { // Overlay background-color: rgba(28, 203, 255, 0.05); - $("body").append("
"); - $("body").append("
"); + $("body").append("
"); + $("body").append("
"); // Set event for any body click initBodyClickEvent() - // Init tuning panel - initTuningPanel(); + // Init canvasdesigner panel + initCanvasdesignerPanel(); } }); diff --git a/src/Umbraco.Web.UI.Client/src/canvasdesigner/canvasdesigner.global.js b/src/Umbraco.Web.UI.Client/src/canvasdesigner/canvasdesigner.global.js index 62844bd0df..ad1b62eb67 100644 --- a/src/Umbraco.Web.UI.Client/src/canvasdesigner/canvasdesigner.global.js +++ b/src/Umbraco.Web.UI.Client/src/canvasdesigner/canvasdesigner.global.js @@ -3,14 +3,14 @@ /* Global function and variable for panel/page com */ /*********************************************************************************************************/ -/* Called for every tuning-over rollover */ -var refrechIntelTuning = function (name) { +/* Called for every canvasdesigner-over rollover */ +var refrechIntelCanvasdesigner = function (name) { - var scope = angular.element($("#tuningPanel")).scope(); + var scope = angular.element($("#canvasdesignerPanel")).scope(); if (scope.schemaFocus != name.toLowerCase()) { var notFound = true; - $.each(scope.tuningModel.configs, function (indexConfig, config) { + $.each(scope.canvasdesignerModel.configs, function (indexConfig, config) { if (config.name && name.toLowerCase() == config.name.toLowerCase()) { scope.currentSelected = config; } @@ -26,20 +26,20 @@ var refrechIntelTuning = function (name) { } /* Called when the iframe is first loaded */ -var setFrameIsLoaded = function (tuningConfig, tuningPalette) { +var setFrameIsLoaded = function (canvasdesignerConfig, canvasdesignerPalette) { - var scope = angular.element($("#tuningPanel")).scope(); + var scope = angular.element($("#canvasdesignerPanel")).scope(); - scope.tuningModel = tuningConfig; - scope.tuningPalette = tuningPalette; - scope.enableTuning++; + scope.canvasdesignerModel = canvasdesignerConfig; + scope.canvasdesignerPalette = canvasdesignerPalette; + scope.enableCanvasdesigner++; scope.$apply(); } /* Iframe body click */ var iframeBodyClick = function () { - var scope = angular.element($("#tuningPanel")).scope(); + var scope = angular.element($("#canvasdesignerPanel")).scope(); scope.closeFloatPanels(); } diff --git a/src/Umbraco.Web.UI.Client/src/canvasdesigner/config/canvasdesigner.config.js b/src/Umbraco.Web.UI.Client/src/canvasdesigner/config/canvasdesigner.config.js index 6ef97529ee..699cd353a7 100644 --- a/src/Umbraco.Web.UI.Client/src/canvasdesigner/config/canvasdesigner.config.js +++ b/src/Umbraco.Web.UI.Client/src/canvasdesigner/config/canvasdesigner.config.js @@ -1,9 +1,9 @@ /*********************************************************************************************************/ -/* Tuning setting panel config */ +/* Canvasdesigner setting panel config */ /*********************************************************************************************************/ -var tuningConfig = { +var canvasdesignerConfig = { configs: [{ name: "Body", schema: "body", diff --git a/src/Umbraco.Web.UI.Client/src/canvasdesigner/config/canvasdesigner.editors.js b/src/Umbraco.Web.UI.Client/src/canvasdesigner/config/canvasdesigner.editors.js deleted file mode 100644 index efa6ec7df6..0000000000 --- a/src/Umbraco.Web.UI.Client/src/canvasdesigner/config/canvasdesigner.editors.js +++ /dev/null @@ -1,1444 +0,0 @@ - -/*********************************************************************************************************/ -/* Tuning setting panel config */ -/*********************************************************************************************************/ - -var tuningConfig = { - categories: [{ - name: "Background", - sections: [{ - name: "Main", - subSections: [{ - name: "Body", - schema: "body", - fields: [ - { - name: "Color", - alias: "backgroundBodyColor", - description: "Background body color", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorBodyBackground" - }, - { - name: "Gradient", - alias: "backgroundBodyGradientColor", - description: "Fade the background to this colour at the bottom", - type: "colorPicker", - value: "" - }, - { - name: "Image/Pattern", - alias: "backgroundBodyImageOrPattern", - description: "Use an image for the background instead of a solid colour/gradient", - type: "bgImagePicker", - value: "" - }, - { - name: "Position", - alias: "backgroundBodyPosition", - description: "Background body position", - type: "bgPositionPicker", - value: "" - }, - { - name: "Cover", - alias: "backgroundBodyCover", - description: "Checked: stretches the chosen image to fill the.\nUnchecked: the image is tiled according to the Repeat setting below", - type: "checkbox", - value: "" - }, - { - name: "Repeat", - alias: "backgroundBodyRepeat", - description: "How to tile the background image", - type: "bgRepeatPicker", - value: "" - }, - { - name: "Attachment", - alias: "backgroundBodyAttachment", - description: "When fixed the background doesn't scroll with the content", - type: "bgAttachmentPicker", - value: "" - } - ] - }, - { - name: "Main", - schema: ".content", - fields: [ - { - name: "Color", - alias: "backgroundMainColumnColor", - description: "Background main column color", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorMainColumnBackground" - }, - { - name: "Gradient Color", - alias: "backgroundMainColumnGradientColor", - description: "Background main column gradient color", - type: "colorPicker", - value: "" - }, - { - name: "Image/Pattern", - alias: "backgroundMainColumnImageOrPattern", - description: "Background main column image/pattern", - type: "bgImagePicker", - value: "" - }, - { - name: "Position", - alias: "backgroundMainColumnPosition", - description: "Background main column position", - type: "bgPositionPicker", - value: "" - }, - { - name: "Cover", - alias: "backgroundMainColumnCover", - description: "Background MainColumn cover", - type: "checkbox", - value: "" - }, - { - name: "Repeat", - alias: "backgroundMainColumnRepeat", - description: "Background main column repeat", - type: "bgRepeatPicker", - value: "" - }, - { - name: "Attachment", - alias: "backgroundMainColumnAttachment", - description: "Background main column attachment", - type: "bgAttachmentPicker", - value: "" - } - ] - }, - { - name: "Header", - schema: "header", - fields: [ - { - name: "Color", - alias: "backgroundHeaderColor", - description: "Background header color", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorHeaderBackground" - }, - { - name: "Gradient Color", - alias: "backgroundHeaderGradientColor", - description: "Background header gradient color", - type: "colorPicker", - value: "" - }, - { - name: "Image/Pattern", - alias: "backgroundHeaderImageOrPattern", - description: "Background header image/pattern", - type: "bgImagePicker", - value: "" - }, - { - name: "Position", - alias: "backgroundHeaderPosition", - description: "Background header position", - type: "bgPositionPicker", - value: "" - }, - { - name: "Cover", - alias: "backgroundHeaderCover", - description: "Background Header cover", - type: "checkbox", - value: "" - }, - { - name: "Repeat", - alias: "backgroundHeaderRepeat", - description: "Background header repeat", - type: "bgRepeatPicker", - value: "" - }, - { - name: "Attachment", - alias: "backgroundHeaderAttachment", - description: "Background header attachment", - type: "bgAttachmentPicker", - value: "" - } - ] - }, - { - name: "Footer", - schema: ".footer", - fields: [ - { - name: "Color", - alias: "backgroundFooterColor", - description: "Background footer color", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorHeaderBackground" - }, - { - name: "Gradient Color", - alias: "backgroundFooterGradientColor", - description: "Background footer gradient color", - type: "colorPicker", - value: "" - }, - { - name: "Image/Pattern", - alias: "backgroundFooterImageOrPattern", - description: "Background footer image/pattern", - type: "bgImagePicker", - value: "" - }, - { - name: "Position", - alias: "backgroundFooterPosition", - description: "Background footer position", - type: "bgPositionPicker", - value: "" - }, - { - name: "Cover", - alias: "backgroundFooterCover", - description: "Background Footer cover", - type: "checkbox", - value: "" - }, - { - name: "Repeat", - alias: "backgroundFooterRepeat", - description: "Background footer repeat", - type: "bgRepeatPicker", - value: "" - }, - { - name: "Attachment", - alias: "backgroundFooterAttachment", - description: "Background footer attachment", - type: "bgAttachmentPicker", - value: "" - } - ] - }] - }] - }, - { - name: "Styling", - sections: [{ - name: "General", - subSections: [{ - name: "Main Styles", - fields: [{ - name: "Layout", - alias: "stylingMainColumnBoxed", - description: "Main column layout", - type: "layoutPicker", - value: "boxed" - }, - { - name: "Header Top Margin", - alias: "stylingHeaderTopMargin", - description: "Header top margin", - type: "slider", - min: "0", - max: "100", - value: "0" - }, - { - name: "Main Top Margin", - alias: "stylingMainColumnTopMargin", - description: "Main column top margin", - type: "slider", - min: "0", - max: "100", - value: "0" - }, - { - name: "Footer Top Margin", - alias: "stylingFooterTopMargin", - description: "Footer top margin", - type: "slider", - min: "0", - max: "100", - value: "0" - }, - { - name: "Footer Bottom Margin", - alias: "stylingFooterBottompMargin", - description: "Footer Bottom margin", - type: "slider", - min: "0", - max: "100", - value: "0" - }, - { - name: "Radius", - alias: "stylingMainColumnRadius", - description: "Main column radius", - type: "slider", - min: "0", - max: "20", - value: "0" - }, - { - name: "Shadow", - alias: "stylingMainColumnShadow", - description: "Main column shadow", - type: "slider", - min: "0", - max: "100", - value: "0" - }] - }, - { - name: "Header Styles", - fields: [{ - name: "Top Border Size", - alias: "stylingHeaderTopBorderSize", - description: "Header top border size", - type: "slider", - min: "0", - max: "50", - value: "0" - }, - { - name: "Bottom Border Size", - alias: "stylingHeaderBottomBorderSize", - description: "Header bottom border size", - type: "slider", - min: "0", - max: "50", - value: "0" - }, - { - name: "Top Border color", - alias: "stylingHeaderTopBorderColor", - description: "Header top border color", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorBase" - }, - { - name: "Bottom Border color", - alias: "stylingHeaderBottomBorderColor", - description: "Header bottom border color", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorBase" - }, - { - name: "Min Height", - alias: "stylingHeaderMinHeight", - description: "Header min height", - type: "slider", - min: "0", - max: "500", - value: "0" - }, - { - name: "Logo Position", - alias: "stylingHeaderLogoTopMargin", - description: "Header logo top margin", - type: "slider", - min: "-100", - max: "100", - value: "0" - }] - }, - { - name: "Pre Header", - schema: ".preHeader-row", - fields: [{ - name: "Display", - alias: "styPreHeaderDisplay", - description: "PreHeader links list display", - type: "displayPicker", - value: "" - }, - { - name: "Background Color", - alias: "styPreHeaderBackgroundColor", - description: "PreHeader links list background color", - type: "colorPicker", - value: "" - }, - { - name: "Top Margin", - alias: "styPreHeaderTopMargin", - description: "PreHeader links list top margin", - type: "slider", - min: "0", - max: "500", - value: "0" - }, - { - name: "Border Top Size", - alias: "styPreHeaderBorderTopSize", - description: "PreHeader links list border top size", - type: "slider", - min: "0", - max: "50", - value: "0" - }, - { - name: "Border Bottom Size", - alias: "styPreHeaderBorderBottomSize", - description: "PreHeader links list border bottom size", - type: "slider", - min: "0", - max: "50", - value: "0" - }, - { - name: "Border Top Color", - alias: "styPreHeaderBorderTopColor", - description: "PreHeader links list border top color", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorBase" - }, - { - name: "Border Bottom Color", - alias: "styPreHeaderBorderBottomColor", - description: "PreHeader links list border bottom color", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorBase" - }] - }, - { - name: "Navigation", - schema: ".navbar-collapse", - fields: [{ - name: "Display", - alias: "stylingNavDisplay", - description: "Navigation display", - type: "displayPicker", - value: "" - }, - { - name: "Background Color", - alias: "stylingNavBackgroundColor", - description: "Navigation background color", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorNavBackground" - }, - { - name: "Background Color L2", - alias: "stylingNavBackgroundDdl", - description: "Navigation background color for Level 2", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorNavBackground" - }, - { - name: "Active Background Color", - alias: "stylingNavBackgroundActiveColor", - description: "Navigation active background color", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorBase" - }, - { - name: "Position", - alias: "stylingNavMarginTop", - description: "Navigation Margin Top", - type: "slider", - min: "-200", - max: "200", - value: "0" - }, - { - name: "Radius", - alias: "stylingNavRadius", - description: "Navigation radius", - type: "slider", - min: "0", - max: "20", - value: "0" - }, - { - name: "Radius Only Top", - alias: "stylingNavRadiusOnlyTop", - description: "Navigation radius only top", - type: "checkbox", - value: "" - }, - { - name: "Active Top Border Size", - alias: "stylingNavItemTopBorderActiveSize", - description: "Navigation active top border size", - type: "slider", - min: "0", - max: "50", - value: "0" - }, - { - name: "Active Bottom Border Size", - alias: "stylingNavItemBottomBorderActiveSize", - description: "Navigation active bottom border size", - type: "slider", - min: "0", - max: "50", - value: "0" - }, - { - name: "Active Top Border Color", - alias: "stylingNavItemTopBorderActiveColor", - description: "Navigation active top border color", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorBase" - }, - { - name: "Active Bottom Border Color", - alias: "stylingNavItemBottomBorderActiveColor", - description: "Navigation active bottom border color", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorBase" - }] - }, - { - name: "Boxes", - fields: [{ - name: "Background Color", - alias: "stylingBoxesBackgroundColor", - description: "Boxes background color", - type: "colorPicker", - value: "" - }, - { - name: "Min Height", - alias: "stylingBoxesMinHeight", - description: "Boxes min height", - type: "slider", - min: "0", - max: "500", - value: "0" - }, - { - name: "Radius", - alias: "stylingBoxesRadius", - description: "Boxes radius", - type: "slider", - min: "0", - max: "20", - value: "0" - }, - { - name: "Border Size", - alias: "stylingBoxesBorderSize", - description: "Boxes border size", - type: "slider", - min: "0", - max: "50", - value: "0" - }, - { - name: "Border Color", - alias: "stylingBoxesBorderColor", - description: "Boxes border color", - type: "colorPicker", - value: "" - }] - }, - { - name: "Thumbnails", - schema: ".thumbnail", - fields: [{ - name: "Background Color", - alias: "stylingThumbnailsBackgroundColor", - description: "Thumbnails background color", - type: "colorPicker", - value: "" - }, - { - name: "Min Height", - alias: "stylingThumbnailsMinHeight", - description: "Thumbnails min height", - type: "slider", - min: "0", - max: "500", - value: "0" - }, - { - name: "Radius", - alias: "stylingThumbnailsRadius", - description: "Thumbnails radius", - type: "slider", - min: "0", - max: "20", - value: "0" - }, - { - name: "Border Size", - alias: "stylingThumbnailsBorderSize", - description: "Thumbnails border size", - type: "slider", - min: "0", - max: "50", - value: "0" - }, - { - name: "Border Color", - alias: "stylingThumbnailsBorderColor", - description: "Thumbnails border color", - type: "colorPicker", - value: "" - }] - }] - }] - }, - { - name: "Fonts", - sections: [{ - name: "Main", - subSections: [{ - name: "Default font", - schema: "p", - fields: [{ - name: "Color", - alias: "FontBodyColor", - description: "", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorFontDefault" - }, - { - name: "Size", - alias: "FontBodySize", - description: "", - type: "slider", - min: "8", - max: "64", - value: "0" - }, - { - name: "Line Height", - alias: "FontBodyLineHeight", - description: "", - type: "slider", - min: "8", - max: "64", - value: "0" - }, - { - name: "Family", - alias: "FontBodyFamily", - description: "", - type: "fontFamilyPicker", - fontType: "", - fontWeight: "", - fontStyle: "", - value: "" - }] - }, - { - name: "Pre Header Font", - schema: ".preHeader-row", - fields: [{ - name: "Font Color", - alias: "FontPreHeaderFontColor", - description: "PreHeader links list font color", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorFontRev" - }, - { - name: "Font Color Hover", - alias: "FontPreHeaderFontColorHover", - description: "PreHeader links list font color hover", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorFontRevActive" - }, - { - name: "Font Size", - alias: "FontPreHeaderFontSize", - description: "PreHeader links list font size", - type: "slider", - min: "8", - max: "36", - value: "0" - }, - { - name: "Line Height", - alias: "FontPreHeaderLineHeight", - description: "PreHeader links list line height", - type: "slider", - min: "20", - max: "200", - value: "0" - }, - { - name: "Family", - alias: "FontPreHeaderFamily", - description: "", - type: "fontFamilyPicker", - fontType: "", - fontWeight: "", - fontStyle: "", - value: "" - } - ] - }, - - { - name: "Navigation Font", - schema: ".nav", - fields: [{ - name: "Font Color", - alias: "FontNavFontColor", - description: "Navigation font color", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorFontRev" - }, - { - name: "Active Font Color", - alias: "FontNavFontActiveColor", - description: "Navigation active font color", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorFontRevActive" - }, - { - name: "Size", - alias: "FontNavSize", - description: "", - type: "slider", - min: "8", - max: "64", - value: "0" - }, - { - name: "Line Height", - alias: "FontNavLineHeight", - description: "Navigation line height", - type: "slider", - min: "20", - max: "200", - value: "0" - }, - { - name: "Family", - alias: "FontNavFamily", - description: "", - type: "fontFamilyPicker", - fontType: "", - fontWeight: "", - fontStyle: "", - value: "" - }] - }, - { - name: "H1", - schema: "h1", - fields: [{ - name: "Color", - alias: "FontH1Color", - description: "", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorBase" - }, - { - name: "Size", - alias: "FontH1Size", - description: "", - type: "slider", - min: "8", - max: "64", - value: "0" - }, - { - name: "Line Height", - alias: "FontH1LineHeight", - description: "", - type: "slider", - min: "8", - max: "64", - value: "0" - }, - { - name: "Top margin", - alias: "FontH1TopMargin", - description: "", - type: "slider", - min: "0", - max: "200", - value: "0" - }, - { - name: "Bottom margin", - alias: "FontH1BottomMargin", - description: "", - type: "slider", - min: "0", - max: "200", - value: "0" - }, - { - name: "Family", - alias: "FontH1Family", - description: "", - type: "fontFamilyPicker", - fontType: "", - fontWeight: "", - fontStyle: "", - value: "" - }] - }, { - name: "H2", - schema: "h2", - fields: [{ - name: "Color", - alias: "FontH2Color", - description: "", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorBase" - }, - { - name: "Size", - alias: "FontH2Size", - description: "", - type: "slider", - min: "8", - max: "64", - value: "0" - }, - { - name: "Line Height", - alias: "FontH2LineHeight", - description: "", - type: "slider", - min: "8", - max: "64", - value: "0" - }, - { - name: "Top margin", - alias: "FontH2TopMargin", - description: "", - type: "slider", - min: "0", - max: "200", - value: "0" - }, - { - name: "Bottom margin", - alias: "FontH2BottomMargin", - description: "", - type: "slider", - min: "0", - max: "200", - value: "0" - }, - { - name: "Family", - alias: "FontH2Family", - description: "", - type: "fontFamilyPicker", - fontType: "", - fontWeight: "", - fontStyle: "", - value: "" - }] - }, { - name: "H3", - schema: "h3", - fields: [{ - name: "Color", - alias: "FontH3Color", - description: "", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorBase" - }, - { - name: "Size", - alias: "FontH3Size", - description: "", - type: "slider", - min: "8", - max: "64", - value: "0" - }, - { - name: "Line Height", - alias: "FontH3LineHeight", - description: "", - type: "slider", - min: "8", - max: "64", - value: "0" - }, - { - name: "Top margin", - alias: "FontH3TopMargin", - description: "", - type: "slider", - min: "0", - max: "200", - value: "0" - }, - { - name: "Bottom margin", - alias: "FontH3BottomMargin", - description: "", - type: "slider", - min: "0", - max: "200", - value: "0" - }, - { - name: "Family", - alias: "FontH3Family", - description: "", - type: "fontFamilyPicker", - fontType: "", - fontWeight: "", - fontStyle: "", - value: "" - }] - }, { - name: "H4", - schema: "h4", - fields: [{ - name: "Color", - alias: "FontH4Color", - description: "", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorFontDefault" - }, - { - name: "Size", - alias: "FontH4Size", - description: "", - type: "slider", - min: "8", - max: "64", - value: "0" - }, - { - name: "Line Height", - alias: "FontH4LineHeight", - description: "", - type: "slider", - min: "8", - max: "64", - value: "0" - }, - { - name: "Top margin", - alias: "FontH4TopMargin", - description: "", - type: "slider", - min: "0", - max: "200", - value: "0" - }, - { - name: "Bottom margin", - alias: "FontH4BottomMargin", - description: "", - type: "slider", - min: "0", - max: "200", - value: "0" - }, - { - name: "Family", - alias: "FontH4Family", - description: "", - type: "fontFamilyPicker", - fontType: "", - fontWeight: "", - fontStyle: "", - value: "" - }] - }, { - name: "H5", - schema: "h5", - fields: [{ - name: "Color", - alias: "FontH5Color", - description: "", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorFontDefault" - }, - { - name: "Size", - alias: "FontH5Size", - description: "", - type: "slider", - min: "8", - max: "64", - value: "0" - }, - { - name: "Line Height", - alias: "FontH5LineHeight", - description: "", - type: "slider", - min: "8", - max: "64", - value: "0" - }, - { - name: "Top margin", - alias: "FontH5TopMargin", - description: "", - type: "slider", - min: "0", - max: "200", - value: "0" - }, - { - name: "Bottom margin", - alias: "FontH5BottomMargin", - description: "", - type: "slider", - min: "0", - max: "200", - value: "0" - }, - { - name: "Family", - alias: "FontH5Family", - description: "", - type: "fontFamilyPicker", - fontType: "", - fontWeight: "", - fontStyle: "", - value: "" - }] - }, { - name: "H6", - schema: "h6", - fields: [{ - name: "Color", - alias: "FontH6Color", - description: "", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorFontDefault" - }, - { - name: "Size", - alias: "FontH6Size", - description: "", - type: "slider", - min: "8", - max: "64", - value: "0" - }, - { - name: "Line Height", - alias: "FontH6LineHeight", - description: "", - type: "slider", - min: "8", - max: "64", - value: "0" - }, - { - name: "Top margin", - alias: "FontH6TopMargin", - description: "", - type: "slider", - min: "0", - max: "200", - value: "0" - }, - { - name: "Bottom margin", - alias: "FontH6BottomMargin", - description: "", - type: "slider", - min: "0", - max: "200", - value: "0" - }, - { - name: "Family", - alias: "FontH6Family", - description: "", - type: "fontFamilyPicker", - fontType: "", - fontWeight: "", - fontStyle: "", - value: "" - }] - }, { - name: "Small", - schema: ".small", - fields: [{ - name: "Color", - alias: "FontSmallColor", - description: "", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorFontDefault" - }, { - name: "Size", - alias: "FontSmallSize", - description: "", - type: "slider", - min: "8", - max: "64", - value: "0" - }, - { - name: "Line Height", - alias: "FontSmallLineHeight", - description: "", - type: "slider", - min: "8", - max: "64", - value: "0" - }, - { - name: "Top margin", - alias: "FontSmallTopMargin", - description: "", - type: "slider", - min: "0", - max: "200", - value: "0" - }, - { - name: "Bottom margin", - alias: "FontSmallBottomMargin", - description: "", - type: "slider", - min: "0", - max: "200", - value: "0" - }, - { - name: "Family", - alias: "FontSmallFamily", - description: "", - type: "fontFamilyPicker", - fontType: "", - fontWeight: "", - fontStyle: "", - value: "" - }] - }, - { - name: "Blockquote", - schema: "blockquote", - fields: [{ - name: "Color", - alias: "FontBlockquoteColor", - description: "", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorFontDefault" - }, { - name: "Size", - alias: "FontBlockquoteSize", - description: "", - type: "slider", - min: "8", - max: "64", - value: "0" - }, - { - name: "Line Height", - alias: "FontBlockquoteLineHeight", - description: "", - type: "slider", - min: "8", - max: "64", - value: "0" - }, - { - name: "Top margin", - alias: "FontBlockquoteTopMargin", - description: "", - type: "slider", - min: "0", - max: "200", - value: "0" - }, - { - name: "Bottom margin", - alias: "FontBlockquoteBottomMargin", - description: "", - type: "slider", - min: "0", - max: "200", - value: "0" - }, - { - name: "Family", - alias: "FontBlockquoteFamily", - description: "", - type: "fontFamilyPicker", - fontType: "", - fontWeight: "", - fontStyle: "", - value: "" - }] - }, { - name: "Highlighted", - schema: ".highlighted", - fields: [{ - name: "Color", - alias: "FontHighlightedColor", - description: "", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorFontRev" - }, - { - name: "Background Color", - alias: "FontHighlightedBackgroundColor", - description: "", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorBase" - }, - { - name: "Family", - alias: "FontHighlightedFamily", - description: "", - type: "fontFamilyPicker", - fontType: "", - fontWeight: "", - fontStyle: "", - value: "" - }] - }, { - name: "Lead", - schema: ".lead", - fields: [{ - name: "Color", - alias: "FontLeadColor", - description: "", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorBase" - }, - { - name: "Size", - alias: "FontLeadSize", - description: "", - type: "slider", - min: "8", - max: "64", - value: "0" - }, - { - name: "Line Height", - alias: "FontLeadLineHeight", - description: "", - type: "slider", - min: "8", - max: "64", - value: "0" - }, - { - name: "Top margin", - alias: "FontLeadTopMargin", - description: "", - type: "slider", - min: "0", - max: "200", - value: "0" - }, - { - name: "Bottom margin", - alias: "FontLeadBottomMargin", - description: "", - type: "slider", - min: "0", - max: "200", - value: "0" - }, - { - name: "Family", - alias: "FontLeadFamily", - description: "", - type: "fontFamilyPicker", - fontType: "", - fontWeight: "", - fontStyle: "", - value: "" - }] - }, { - name: "Button", - schema: ".button", - fields: [{ - name: "Color", - alias: "FontButtonColor", - description: "", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorFontRev" - }, - { - name: "Background Color", - alias: "FontButtonBackgroundColor", - description: "", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorBase" - }, - { - name: "Color Hover", - alias: "FontButtonColorHover", - description: "", - type: "colorPicker", - value: "" - }, - { - name: "Background Color Hover", - alias: "FontButtonBackgroundColorHover", - description: "", - type: "colorPicker", - value: "" - }, - { - name: "Size", - alias: "FontButtonSize", - description: "", - type: "slider", - min: "8", - max: "64", - value: "0" - }, - { - name: "Line Height", - alias: "FontButtonLineHeight", - description: "", - type: "slider", - min: "8", - max: "64", - value: "0" - }, - { - name: "Padding", - alias: "FontButtonPadding", - description: "", - type: "slider", - min: "0", - max: "200", - value: "0" - }, - { - name: "Family", - alias: "FontButtonFamily", - description: "", - type: "fontFamilyPicker", - fontType: "", - fontWeight: "", - fontStyle: "", - value: "" - }] - }, - { - name: "Link", - schema: "p a", - fields: [{ - name: "Color", - alias: "FontLinkColor", - description: "", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorBase" - }, { - name: "Color Hover", - alias: "FontLinkColorHover", - description: "", - type: "colorPicker", - value: "" - }] - }] - }] - }] -} - -var rowModel = { - name: "Row", - schema: "", - fields: [ - { - name: "Background color", - alias: "backgroundRowColor", - description: "Background body color", - type: "colorPicker", - value: "", - colorPaletteProperty: "colorBodyBackground" - }, - { - name: "Background gradient", - alias: "backgroundRowGradientColor", - description: "Fade the background to this colour at the bottom", - type: "colorPicker", - value: "" - }, - { - name: "Image/Pattern", - alias: "backgroundRowImageOrPattern", - description: "Use an image for the background instead of a solid colour/gradient", - type: "bgImagePicker", - value: "" - }, - { - name: "Image position", - alias: "backgroundRowPosition", - description: "Background body position", - type: "bgPositionPicker", - value: "" - }, - { - name: "Stretch background", - alias: "backgroundRowCover", - description: "Checked: stretches the chosen image to fill the.\nUnchecked: the image is tiled according to the Repeat setting below", - type: "checkbox", - value: "" - }, - { - name: "Background tiling", - alias: "backgroundRowRepeat", - description: "How to tile the background image", - type: "bgRepeatPicker", - value: "" - }, - { - name: "Background scrolling behaviour", - alias: "backgroundRowAttachment", - description: "When fixed the background doesn't scroll with the content", - type: "bgAttachmentPicker", - value: "" - }, - { - name: "Full size", - alias: "rowFullSize", - description: "", - type: "checkbox", - value: "" - } - ] -}; diff --git a/src/Umbraco.Web.UI.Client/src/canvasdesigner/config/canvasdesigner.palettes.js b/src/Umbraco.Web.UI.Client/src/canvasdesigner/config/canvasdesigner.palettes.js index ebe49966ab..6f46b83108 100644 --- a/src/Umbraco.Web.UI.Client/src/canvasdesigner/config/canvasdesigner.palettes.js +++ b/src/Umbraco.Web.UI.Client/src/canvasdesigner/config/canvasdesigner.palettes.js @@ -1,9 +1,9 @@ /*********************************************************************************************************/ -/* Tuning palette tab config */ +/* Canvasdesigner palette tab config */ /*********************************************************************************************************/ -var tuningPalette = [ +var canvasdesignerPalette = [ { name:"Default", diff --git a/src/Umbraco.Web.UI.Client/src/canvasdesigner/editors/background.html b/src/Umbraco.Web.UI.Client/src/canvasdesigner/editors/background.html index 8463374504..9346415999 100644 --- a/src/Umbraco.Web.UI.Client/src/canvasdesigner/editors/background.html +++ b/src/Umbraco.Web.UI.Client/src/canvasdesigner/editors/background.html @@ -16,9 +16,9 @@ " + @@ -1343,13 +1343,13 @@ namespace Umbraco.Web if (UmbracoContext.Current.InPreviewMode) { - tuningConfigPath = !string.IsNullOrEmpty(tuningConfigPath) ? tuningConfigPath : "/umbraco/js/canvasdesigner.config.js"; - tuningPalettesPath = !string.IsNullOrEmpty(tuningPalettesPath) ? tuningConfigPath : "/umbraco/js/canvasdesigner.palettes.js"; + canvasdesignerConfigPath = !string.IsNullOrEmpty(canvasdesignerConfigPath) ? canvasdesignerConfigPath : "/umbraco/js/canvasdesigner.config.js"; + canvasdesignerPalettesPath = !string.IsNullOrEmpty(canvasdesignerPalettesPath) ? canvasdesignerConfigPath : "/umbraco/js/canvasdesigner.palettes.js"; if (!string.IsNullOrEmpty(cssPath)) result = string.Format(noPreviewLinks, cssPath) + Environment.NewLine; - result = result + string.Format(previewLink, tuningConfigPath, tuningPalettesPath, pageId); + result = result + string.Format(previewLink, canvasdesignerConfigPath, canvasdesignerPalettesPath, pageId); } else {