From 066927742e47cd29776e796077347370269d423b Mon Sep 17 00:00:00 2001 From: AussieInSeattle Date: Thu, 19 Feb 2015 15:47:11 -0800 Subject: [PATCH 1/4] Update UI for settings for a custom grid editor --- .../src/views/propertyeditors/grid/grid.html | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.html index 6f092c8ea8..687130c952 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.html @@ -162,6 +162,15 @@ + + +
+ + + +
@@ -251,4 +260,4 @@ - \ No newline at end of file + From b2947264e1e25e5284fab03990d7e833cba06a75 Mon Sep 17 00:00:00 2001 From: AussieInSeattle Date: Thu, 19 Feb 2015 15:49:03 -0800 Subject: [PATCH 2/4] edit function for settings on a custom grid editor --- .../propertyeditors/grid/grid.controller.js | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js index e4cb4e380d..86bfce3f32 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js @@ -273,6 +273,36 @@ angular.module("umbraco") }); }; + + + // ********************************************* + // Control management functions + // ********************************************* + + $scope.editControlSettings = function (control) { + + var obj = $scope.model.config; + obj.items.config = control.editor.config.settings; + + dialogService.open( + { + template: "views/propertyeditors/grid/dialogs/config.html", + gridItem: { "config": (control.value ? control.value.settings : null) }, + itemType: null, + config: obj, + callback: function (data) { + if (angular.isObject(control.value)) + control.value.settings = data.config; + else { + control.value = { + "settings": data.config + }; + } + //console.log(control.value); + //console.log(control.value.settings); + } + }); + }; // ********************************************* // Area management functions From 05a0846e89cf97ae14459b25b3d928de77a2ce6a Mon Sep 17 00:00:00 2001 From: AussieInSeattle Date: Mon, 9 Mar 2015 11:22:16 -0700 Subject: [PATCH 3/4] Update grid.controller.js --- .../src/views/propertyeditors/grid/grid.controller.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js index 86bfce3f32..4bdf4088ca 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js @@ -291,15 +291,7 @@ angular.module("umbraco") itemType: null, config: obj, callback: function (data) { - if (angular.isObject(control.value)) - control.value.settings = data.config; - else { - control.value = { - "settings": data.config - }; - } - //console.log(control.value); - //console.log(control.value.settings); + control.settings = data.config; } }); }; From 2276584c90d0d2237c7a5bc0bf9c0246335cbcf5 Mon Sep 17 00:00:00 2001 From: AussieInSeattle Date: Wed, 11 Mar 2015 11:52:57 -0700 Subject: [PATCH 4/4] Update for when first control has settings Adding style for when first control has settings - it was previously overlapping the "cog" icon above it --- .../src/views/propertyeditors/grid/grid.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.html index 687130c952..fa8515fcc7 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.html @@ -164,7 +164,7 @@ -
+