From 32bedfaa6aa12696d33be71a2c5dc10b118e08ec Mon Sep 17 00:00:00 2001 From: Jason Prothero Date: Fri, 27 Feb 2015 10:06:45 -0800 Subject: [PATCH 1/6] Changed the surrounding quotes for Grid custom settings/styles to be double quotes --- src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap2.cshtml | 4 ++-- src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3.cshtml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap2.cshtml b/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap2.cshtml index 5027348385..6bc730e1f8 100644 --- a/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap2.cshtml +++ b/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap2.cshtml @@ -65,7 +65,7 @@ if(cfg != null) foreach (JProperty property in cfg.Properties()) { - attrs.Add(property.Name + "='" + property.Value.ToString() + "'"); + attrs.Add(property.Name + "=\"" + property.Value.ToString() + "\""); } JObject style = contentItem.styles; @@ -76,7 +76,7 @@ cssVals.Add(property.Name + ":" + property.Value.ToString() + ";"); if (cssVals.Any()) - attrs.Add("style='" + string.Join(" ", cssVals) + "'"); + attrs.Add("style=\"" + string.Join(" ", cssVals) + "\""); } return new MvcHtmlString(string.Join(" ", attrs)); diff --git a/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3.cshtml b/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3.cshtml index a752042e90..f76028d296 100644 --- a/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3.cshtml +++ b/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3.cshtml @@ -65,7 +65,7 @@ if(cfg != null) foreach (JProperty property in cfg.Properties()) { - attrs.Add(property.Name + "='" + property.Value.ToString() + "'"); + attrs.Add(property.Name + "=\"" + property.Value.ToString() + "\""); } JObject style = contentItem.styles; @@ -76,7 +76,7 @@ cssVals.Add(property.Name + ":" + property.Value.ToString() + ";"); if (cssVals.Any()) - attrs.Add("style='" + string.Join(" ", cssVals) + "'"); + attrs.Add("style=\"" + string.Join(" ", cssVals) + "\""); } return new MvcHtmlString(string.Join(" ", attrs)); From f742c0a95869f30dca578c3a0e4cbc534bb52271 Mon Sep 17 00:00:00 2001 From: Helmuth Bederna Date: Wed, 18 Mar 2015 10:41:15 +0100 Subject: [PATCH 2/6] fixed issue U4-6419 by removing that character --- src/Umbraco.Web/Models/TagModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Models/TagModel.cs b/src/Umbraco.Web/Models/TagModel.cs index d0845ff8f8..ef6b0a86c1 100644 --- a/src/Umbraco.Web/Models/TagModel.cs +++ b/src/Umbraco.Web/Models/TagModel.cs @@ -19,7 +19,7 @@ namespace Umbraco.Web.Models [DataMember(Name = "group")] public string Group { get; set; } - [DataMember(Name = "nodeCount`")] + [DataMember(Name = "nodeCount")] public int NodeCount { get; set; } } } From c5f26c7c158ed7f7f23e29990ab6c8e3c07876c7 Mon Sep 17 00:00:00 2001 From: Per Ploug Date: Wed, 18 Mar 2015 11:44:49 +0100 Subject: [PATCH 3/6] Fixes: U4-6331 The grid tools overlay disable the links/buttons on smaller screens --- src/Umbraco.Web.UI.Client/src/less/gridview.less | 2 ++ .../src/views/propertyeditors/grid/grid.html | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/gridview.less b/src/Umbraco.Web.UI.Client/src/less/gridview.less index 778acc5607..107e042a16 100644 --- a/src/Umbraco.Web.UI.Client/src/less/gridview.less +++ b/src/Umbraco.Web.UI.Client/src/less/gridview.less @@ -155,6 +155,8 @@ IFRAME {overflow:hidden;} opacity: 0.3; z-index: 50; } +//special rule to ensure forms doesnt overrride (forms will align in a later release) +.umb-grid .cell-tools{width: 50px !important;} .usky-grid .cell-tools.with-prompt { width:200px; 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..cd3e504156 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 @@ -1,4 +1,4 @@ -
+
@@ -57,7 +57,8 @@ ng-mouseleave="disableCurrentRow()"> -
+
From c2cfd26ee6f86d16b25c7ca1f8511d327dc759a1 Mon Sep 17 00:00:00 2001 From: Per Ploug Date: Wed, 18 Mar 2015 11:45:04 +0100 Subject: [PATCH 4/6] Fixes broken bower jquery reference --- src/Umbraco.Web.UI.Client/bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/bower.json b/src/Umbraco.Web.UI.Client/bower.json index e8ad94653f..23744b0ff7 100644 --- a/src/Umbraco.Web.UI.Client/bower.json +++ b/src/Umbraco.Web.UI.Client/bower.json @@ -38,7 +38,7 @@ "": "tmhDynamicLocale.min.{js,js.map}" }, "jquery": { - "": "jquery.min.{js,map}" + "": "dist/jquery.min.{js,map}" }, "jquery-file-upload": { "": "**/jquery.{fileupload,fileupload-process,fileupload-angular,fileupload-image}.js" From 3a9ad91f8ff8d60f29d7579ca04c0acf403caf7a Mon Sep 17 00:00:00 2001 From: Per Ploug Date: Wed, 18 Mar 2015 11:45:22 +0100 Subject: [PATCH 5/6] Adds better error handling to missing grid editors --- .../propertyeditors/grid/editors/error.html | 2 ++ .../propertyeditors/grid/grid.controller.js | 25 ++++++++++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/error.html diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/error.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/error.html new file mode 100644 index 0000000000..67ef4ea112 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/error.html @@ -0,0 +1,2 @@ +

Something went wrong with this editor, below is the data stored:

+
{{control | json}}
\ No newline at end of file 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 f802173a25..11afb678a2 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 @@ -572,18 +572,31 @@ angular.module("umbraco") control.$index = index; control.$uniqueId = $scope.setUniqueId(); + //error handling in case of missing editor.. + //should only happen if stripped earlier + if(!control.editor){ + control.$editorPath = "views/propertyeditors/grid/editors/error.html"; + } + if(!control.$editorPath){ var editorConfig = $scope.getEditor(control.editor.alias); - control.editor = editorConfig; - //if its a path - if(_.indexOf(control.editor.view, "/") >= 0){ - control.$editorPath = control.editor.view; + if(editorConfig){ + control.editor = editorConfig; + + //if its a path + if(_.indexOf(control.editor.view, "/") >= 0){ + control.$editorPath = control.editor.view; + }else{ + //use convention + control.$editorPath = "views/propertyeditors/grid/editors/" + control.editor.view + ".html"; + } }else{ - //use convention - control.$editorPath = "views/propertyeditors/grid/editors/" + control.editor.view + ".html"; + control.$editorPath = "views/propertyeditors/grid/editors/error.html"; } } + + }; From 00fbc6dfcb5a48bb6f4c7b0bb3d2ae25f54361bc Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 18 Mar 2015 13:05:21 +0100 Subject: [PATCH 6/6] Revert "Fixes broken bower jquery reference" This reverts commit c2cfd26ee6f86d16b25c7ca1f8511d327dc759a1. --- src/Umbraco.Web.UI.Client/bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/bower.json b/src/Umbraco.Web.UI.Client/bower.json index 23744b0ff7..e8ad94653f 100644 --- a/src/Umbraco.Web.UI.Client/bower.json +++ b/src/Umbraco.Web.UI.Client/bower.json @@ -38,7 +38,7 @@ "": "tmhDynamicLocale.min.{js,js.map}" }, "jquery": { - "": "dist/jquery.min.{js,map}" + "": "jquery.min.{js,map}" }, "jquery-file-upload": { "": "**/jquery.{fileupload,fileupload-process,fileupload-angular,fileupload-image}.js"