From 6ea7b323636da5ee8452456fbd3af3ec5d1a6da0 Mon Sep 17 00:00:00 2001 From: Robert Foster Date: Sat, 8 Nov 2014 00:57:37 +1100 Subject: [PATCH 01/15] Fixes issue U4-5754 Attempt to set start node on Media Picker sends user to Content section --- .../src/views/prevalueeditors/mediapicker.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/mediapicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/mediapicker.controller.js index 633e9cb9f5..664c246b14 100644 --- a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/mediapicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/mediapicker.controller.js @@ -58,7 +58,7 @@ function mediaPickerController($scope, dialogService, entityResource, $log, icon //load media data var modelIds = $scope.model.value ? $scope.model.value.split(',') : []; - entityResource.getByIds(modelIds, $scope.cfg.entityType).then(function (data) { + entityResource.getByIds(modelIds, dialogOptions.entityType).then(function (data) { _.each(data, function (item, i) { item.icon = iconHelper.convertFromLegacyIcon(item.icon); $scope.renderModel.push({ name: item.name, id: item.id, icon: item.icon }); From ca951aa56b9f928d1f1c34f178f7f28bc824b4ec Mon Sep 17 00:00:00 2001 From: Robert Foster Date: Sat, 8 Nov 2014 01:13:17 +1100 Subject: [PATCH 02/15] Fix for issue U4-5755 Issue: Multiple mixins with same tab cause content node edit crash --- src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs b/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs index 264d90f36d..81817da200 100644 --- a/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs @@ -211,7 +211,7 @@ namespace Umbraco.Web.Models.Mapping } //then we'll just use the root group's data to make the composite tab - var rootGroup = propertyGroups.Single(x => x.ParentId == null); + var rootGroup = propertyGroups.First(x => x.ParentId == null); aggregateTabs.Add(new Tab { Id = rootGroup.Id, From c0c624d62efe4adacef977861ad28a25cef14522 Mon Sep 17 00:00:00 2001 From: Jeavon Leopold Date: Mon, 10 Nov 2014 14:43:43 +0000 Subject: [PATCH 03/15] A few small tweaks to the C# part of the Grid editor for coding standards --- src/Umbraco.Web/GridTemplateExtensions.cs | 21 ++++++++++--------- .../PropertyEditors/GridPropertyEditor.cs | 5 ++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Umbraco.Web/GridTemplateExtensions.cs b/src/Umbraco.Web/GridTemplateExtensions.cs index 27b4a45d6b..799eb1a097 100644 --- a/src/Umbraco.Web/GridTemplateExtensions.cs +++ b/src/Umbraco.Web/GridTemplateExtensions.cs @@ -17,7 +17,7 @@ namespace Umbraco.Web public static MvcHtmlString GetGridHtml(this IPublishedProperty property, string framework = "bootstrap3") { var view = "Grid/" + framework; - return new MvcHtmlString(renderPartialViewToString(view, property.Value)); + return new MvcHtmlString(RenderPartialViewToString(view, property.Value)); } public static MvcHtmlString GetGridHtml(this IPublishedContent contentItem) @@ -33,20 +33,22 @@ namespace Umbraco.Web public static MvcHtmlString GetGridHtml(this IPublishedContent contentItem, string propertyAlias, string framework) { var view = "Grid/" + framework; - var model = contentItem.GetProperty(propertyAlias).Value; + var model = contentItem.GetProperty(propertyAlias).Value; - return new MvcHtmlString(renderPartialViewToString(view, model)); + return new MvcHtmlString(RenderPartialViewToString(view, model)); } - private static string renderPartialViewToString(string viewName, object model) + private static string RenderPartialViewToString(string viewName, object model) { using (var sw = new StringWriter()) { - var cc = new ControllerContext(); - cc.RequestContext = new RequestContext(UmbracoContext.Current.HttpContext, new RouteData() - { - Route = RouteTable.Routes["Umbraco_default"] - }); + var cc = new ControllerContext + { + RequestContext = + new RequestContext( + UmbracoContext.Current.HttpContext, + new RouteData() { Route = RouteTable.Routes["Umbraco_default"] }) + }; var routeHandler = new RenderRouteHandler(ControllerBuilder.Current.GetControllerFactory(), UmbracoContext.Current); var routeDef = routeHandler.GetUmbracoRouteDefinition(cc.RequestContext, UmbracoContext.Current.PublishedContentRequest); @@ -66,6 +68,5 @@ namespace Umbraco.Web return sw.GetStringBuilder().ToString(); } } - } } diff --git a/src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs index b1a052ba88..8603b6887a 100644 --- a/src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs @@ -23,12 +23,11 @@ namespace Umbraco.Web.PropertyEditors protected override PreValueEditor CreatePreValueEditor() { - return new gridPreValueEditor(); + return new GridPreValueEditor(); } - } - internal class gridPreValueEditor : PreValueEditor + internal class GridPreValueEditor : PreValueEditor { [PreValueField("items", "Grid", "views/propertyeditors/grid/grid.prevalues.html", Description = "Grid configuration")] public string Items { get; set; } From 4d9f6ccd220f202a2886c66683a18014441113c5 Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 11 Nov 2014 17:52:40 +1100 Subject: [PATCH 04/15] Fixes: U4-5780 RenderActionInvoker needs a perf fix with caching when it's using reflection --- src/Umbraco.Web/Mvc/RenderActionInvoker.cs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web/Mvc/RenderActionInvoker.cs b/src/Umbraco.Web/Mvc/RenderActionInvoker.cs index e01268d245..f6b3c673bf 100644 --- a/src/Umbraco.Web/Mvc/RenderActionInvoker.cs +++ b/src/Umbraco.Web/Mvc/RenderActionInvoker.cs @@ -1,3 +1,5 @@ +using System; +using System.Collections.Concurrent; using System.Linq; using System.Web.Mvc; using System.Web.Mvc.Async; @@ -10,6 +12,8 @@ namespace Umbraco.Web.Mvc public class RenderActionInvoker : AsyncControllerActionInvoker { + private static readonly ConcurrentDictionary IndexDescriptors = new ConcurrentDictionary(); + /// /// Ensures that if an action for the Template name is not explicitly defined by a user, that the 'Index' action will execute /// @@ -27,12 +31,15 @@ namespace Umbraco.Web.Mvc //check if the controller is an instance of IRenderMvcController if (controllerContext.Controller is IRenderMvcController) { - return new ReflectedActionDescriptor( - controllerContext.Controller.GetType().GetMethods() - .First(x => x.Name == "Index" && - x.GetCustomAttributes(typeof (NonActionAttribute), false).Any() == false), - "Index", - controllerDescriptor); + return IndexDescriptors.GetOrAdd(controllerContext.Controller.GetType(), + type => new ReflectedActionDescriptor( + controllerContext.Controller.GetType().GetMethods() + .First(x => x.Name == "Index" && + x.GetCustomAttributes(typeof (NonActionAttribute), false).Any() == false), + "Index", + controllerDescriptor)); + + } } From 15119fc8d0662a38504a223b720033cfc6e3253d Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 11 Nov 2014 18:03:37 +1100 Subject: [PATCH 05/15] removes other refs to $scope.cfg, this is never necessary --- .../prevalueeditors/treepicker.controller.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treepicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treepicker.controller.js index ae691fcaf7..5dc615b449 100644 --- a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treepicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treepicker.controller.js @@ -8,7 +8,7 @@ angular.module('umbraco') $scope.ids = []; - $scope.cfg = { + var config = { multiPicker: false, entityType: "Document", type: "content", @@ -17,7 +17,7 @@ angular.module('umbraco') if($scope.model.value){ $scope.ids = $scope.model.value.split(','); - entityResource.getByIds($scope.ids, $scope.cfg.entityType).then(function(data){ + entityResource.getByIds($scope.ids, config.entityType).then(function (data) { _.each(data, function (item, i) { item.icon = iconHelper.convertFromLegacyIcon(item.icon); $scope.renderModel.push({name: item.name, id: item.id, icon: item.icon}); @@ -26,12 +26,13 @@ angular.module('umbraco') } - $scope.openContentPicker =function(){ - var d = dialogService.treePicker({ - section: $scope.cfg.type, - treeAlias: $scope.cfg.type, - multiPicker: $scope.cfg.multiPicker, - callback: populate}); + $scope.openContentPicker =function() { + var d = dialogService.treePicker({ + section: config.type, + treeAlias: config.type, + multiPicker: config.multiPicker, + callback: populate + }); }; $scope.remove =function(index){ From 805c1bf8d06c44b7751ae6e084571613f559f3c8 Mon Sep 17 00:00:00 2001 From: Stefan Kip Date: Tue, 11 Nov 2014 13:59:09 +0100 Subject: [PATCH 06/15] Disabled trimming Set ngTrim to false. --- .../src/views/propertyeditors/textbox/textbox.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textbox/textbox.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textbox/textbox.html index 7df7e9fded..b2c57b4737 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textbox/textbox.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textbox/textbox.html @@ -2,7 +2,8 @@ + ng-required="model.validation.mandatory" + ng-trim="false" /> Required From a8c73296ea1f8d884ba8d75125edef6b619a8612 Mon Sep 17 00:00:00 2001 From: antoine Date: Tue, 11 Nov 2014 20:58:35 +0100 Subject: [PATCH 07/15] Right info and warm highlight for rows' and controls' options (remove, move and setting) --- .../src/less/gridview.less | 7 +- .../propertyeditors/grid/grid.controller.js | 44 +++++++------ .../src/views/propertyeditors/grid/grid.html | 64 +++++++++++-------- 3 files changed, 65 insertions(+), 50 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/gridview.less b/src/Umbraco.Web.UI.Client/src/less/gridview.less index 1367faf3c7..578353cf38 100644 --- a/src/Umbraco.Web.UI.Client/src/less/gridview.less +++ b/src/Umbraco.Web.UI.Client/src/less/gridview.less @@ -482,19 +482,16 @@ padding-bottom: 20px; } - .usky-grid .usky-row{ - - } - .usky-grid .usky-control{ margin: 10px 0 0 0; padding: 5px; + border: 1px dashed transparent; } .usky-grid .usky-templates-columns{ margin-top: 30px; } - + .usky-grid .usky-row-inner{ margin-right: 45px; border: 1px dashed transparent; 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 ec47771491..05682dce29 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 @@ -184,20 +184,20 @@ angular.module("umbraco") $scope.currentRow = null; }; - $scope.setCurrentRemoveRow = function (Row) { - $scope.currentRemoveRow = Row; + $scope.setWarnighlightRow = function (row) { + $scope.currentWarnhighlightRow = row; }; - $scope.disableCurrentRemoveRow = function (Row) { - $scope.currentRemoveRow = null; + $scope.disableWarnhighlightRow = function () { + $scope.currentWarnhighlightRow = null; }; - $scope.setCurrentMovedRow = function (Row) { - $scope.currentMovedRow = Row; + $scope.setInfohighlightRow = function (row) { + $scope.currentInfohighlightRow = row; }; - $scope.disableCurrentMovedRow = function (Row) { - $scope.currentMovedRow = null; + $scope.disableInfohighlightRow = function () { + $scope.currentInfohighlightRow = null; }; $scope.getAllowedLayouts = function(column){ @@ -252,14 +252,14 @@ angular.module("umbraco") }; // ********************************************* - // Cell management functions + // Area management functions // ********************************************* $scope.setCurrentCell = function (cell) { $scope.currentCell = cell; }; - $scope.disableCurrentCell = function (cell) { + $scope.disableCurrentCell = function () { $scope.currentCell = null; }; @@ -272,7 +272,13 @@ angular.module("umbraco") } }; + $scope.setInfohighlightArea = function (cell) { + $scope.currentInfohighlightArea = cell; + }; + $scope.disableInfohighlightArea = function () { + $scope.currentInfohighlightArea = null; + }; // ********************************************* @@ -294,22 +300,20 @@ angular.module("umbraco") $scope.currentToolsControl = null; }; - $scope.setCurrentRemoveControl = function (Control) { - $scope.currentRemoveControl = Control; + $scope.setWarnhighlightControl = function (Control) { + $scope.currentWarnhighlightControl = Control; }; - $scope.disableCurrentRemoveControl = function (Control) { - $scope.currentRemoveControl = null; + $scope.disableWarnhighlightControl = function (Control) { + $scope.currentWarnhighlightControl = null; }; - $scope.setCurrentMovedControl = function (Control) { - $scope.currentRow = null; - $scope.currentRemoveControl = null; - $scope.currentMovedControl = Control; + $scope.setInfohighlightControl = function (Control) { + $scope.currentInfohighlightControl = Control; }; - $scope.disableCurrentMovedControl = function (Control) { - $scope.currentMovedControl = null; + $scope.disableInfohighlightControl = function (Control) { + $scope.currentInfohighlightControl = null; }; $scope.setUniqueId = function (cell, index) { 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 e8ce3f9316..a726d9c036 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 @@ -65,8 +65,8 @@
+ ng-mouseover="setWarnighlightRow(row)" + ng-mouseleave="disableWarnhighlightRow(row)"> Are you sure? @@ -79,13 +79,19 @@ @@ -94,23 +100,25 @@
+ ng-class="{last:$last,first:$first,warnhighlight:currentWarnhighlightRow == row, infohighlight:currentInfohighlightRow == row}">
- +
- +
@@ -118,12 +126,12 @@ ng-animate="'fade'" ng-show="control && (currentControl == control)"> - +
+ ng-mouseover="setWarnhighlightControl(control)" + ng-mouseleave="disableWarnhighlightControl(control)"> Are you sure? @@ -134,25 +142,32 @@
- + + +
-
-
- To start, click the - below and add your first element -

-
+
+ To start, click the + below and add your first element +

+
- +
From c68067eb09e6c739c7d3cbe20814f9a2b626c225 Mon Sep 17 00:00:00 2001 From: antoine Date: Tue, 11 Nov 2014 21:27:38 +0100 Subject: [PATCH 08/15] highlight area for setting, not control. --- .../src/views/propertyeditors/grid/grid.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 a726d9c036..62d372512d 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 @@ -108,8 +108,9 @@
@@ -117,8 +118,6 @@ ng-mouseover="setCurrentControl(control)" ng-mouseleave="disableCurrentControl(control)" ng-animate="'fade'" - ng-class="{infohighlight:currentInfohighlightArea == area, - warnhighlight:currentWarnhighlightArea == area}" class="usky-control"> From 3420694cca3c5a4eee16c58ad51625e94d2b52bf Mon Sep 17 00:00:00 2001 From: antoine Date: Tue, 11 Nov 2014 21:56:25 +0100 Subject: [PATCH 09/15] Some grid view css adjustments --- src/Umbraco.Web.UI.Client/src/less/gridview.less | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/gridview.less b/src/Umbraco.Web.UI.Client/src/less/gridview.less index 578353cf38..16d49939d4 100644 --- a/src/Umbraco.Web.UI.Client/src/less/gridview.less +++ b/src/Umbraco.Web.UI.Client/src/less/gridview.less @@ -186,7 +186,7 @@ .usky-grid .cell-tools-move { display:inline-block; position: absolute; - top: 40px; + top: 33px; right: 5px; z-index: 500; cursor: move @@ -194,7 +194,7 @@ .usky-grid .cell-tools-edit{ position: absolute; - top: 80px; + top: 66px; right: 5px; } @@ -229,11 +229,11 @@ /*border-bottom:1px solid rgba(182, 182, 182, 0.0) !important;*/ } -.usky-grid .warnhighlight{ +.usky-grid .warnhighlight, .usky-grid .td.last.warnhighlight{ border: 1px dashed @red !important; } -.usky-grid .infohighlight{ +.usky-grid .infohighlight, .usky-grid .td.last.infohighlight{ border: 1px dashed @blue !important; } @@ -327,7 +327,7 @@ // ICONS // ------------------------- .usky-grid .iconBox { - padding: 4px 7px 4px 7px; + padding: 4px 6px 4px 6px; display: inline-block; cursor: pointer; border-radius: 200px; @@ -339,6 +339,7 @@ background: @blue !important; color: white !important; border-color: @blue !important; + text-decoration:none; } .usky-grid .iconBox a:hover { @@ -370,12 +371,10 @@ .usky-grid .iconBox i { font-size:16px !important; color: #5F5F5F; + display:block; } - - - .usky-grid ul { display:inline-block; list-style:none; From 4562237a965130f5759db098832e8150e2616e24 Mon Sep 17 00:00:00 2001 From: antoine Date: Tue, 11 Nov 2014 22:04:30 +0100 Subject: [PATCH 10/15] U4-5778 Grid: Not all of the add-circle/button is clickable --- .../src/views/propertyeditors/grid/grid.html | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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 62d372512d..7ecf2d4cbb 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 @@ -189,12 +189,10 @@ ng-if="!currentToolsControl" ng-animate="'fade'"> -
- - - -
- + + + +
From f6c39362cd2eee308d4363f839ec311859e7b830 Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 12 Nov 2014 10:05:20 +1100 Subject: [PATCH 11/15] reverts codemirror tinymce editor from release until we can fix the IE issue with it, people can still enable it if they want though. --- src/Umbraco.Web.UI/config/tinyMceConfig.Release.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI/config/tinyMceConfig.Release.config b/src/Umbraco.Web.UI/config/tinyMceConfig.Release.config index 54c03a4970..db84225ed0 100644 --- a/src/Umbraco.Web.UI/config/tinyMceConfig.Release.config +++ b/src/Umbraco.Web.UI/config/tinyMceConfig.Release.config @@ -6,7 +6,7 @@ code images/editor/code.gif - code + code 1 @@ -199,7 +199,7 @@ - codemirror + code paste umbracolink anchor From ae47ad882d13d347045e58d3c6e2b5d3a01b521c Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 12 Nov 2014 10:40:16 +0100 Subject: [PATCH 12/15] #U4-5592 Fixed, Due in version 7.2.0 #U4-5746 Fixed, Due in version 7.2.0 Note: dotless is required for the artist formerly known as tuning --- build/NuSpecs/UmbracoCms.Core.nuspec | 5 +++-- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 12 +++++++++--- src/Umbraco.Web.UI/packages.config | 3 ++- src/Umbraco.Web/packages.config | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/build/NuSpecs/UmbracoCms.Core.nuspec b/build/NuSpecs/UmbracoCms.Core.nuspec index 1afcf53efa..46819783f0 100644 --- a/build/NuSpecs/UmbracoCms.Core.nuspec +++ b/build/NuSpecs/UmbracoCms.Core.nuspec @@ -33,8 +33,9 @@ - - + + + diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 08e4af853c..4a341b810c 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -123,6 +123,10 @@ False ..\packages\ClientDependency-Mvc.1.7.0.4\lib\ClientDependency.Core.Mvc.dll + + False + ..\packages\dotless.1.4.1.0\lib\dotless.Core.dll + False ..\packages\Examine.0.1.57.2941\lib\Examine.dll @@ -132,10 +136,9 @@ False ..\packages\ImageProcessor.1.9.5.0\lib\ImageProcessor.dll - + False - ..\packages\ImageProcessor.Web.3.3.0.0\lib\net45\ImageProcessor.Web.dll - True + ..\packages\ImageProcessor.Web.3.3.1.0\lib\net45\ImageProcessor.Web.dll False @@ -199,6 +202,7 @@ ..\packages\Microsoft.AspNet.WebApi.Client.4.0.30506.0\lib\net40\System.Net.Http.Formatting.dll + True False @@ -223,9 +227,11 @@ ..\packages\Microsoft.AspNet.WebApi.Core.4.0.30506.0\lib\net40\System.Web.Http.dll + True ..\packages\Microsoft.AspNet.WebApi.WebHost.4.0.30506.0\lib\net40\System.Web.Http.WebHost.dll + True True diff --git a/src/Umbraco.Web.UI/packages.config b/src/Umbraco.Web.UI/packages.config index 2275d29268..bec3939860 100644 --- a/src/Umbraco.Web.UI/packages.config +++ b/src/Umbraco.Web.UI/packages.config @@ -3,9 +3,10 @@ + - + diff --git a/src/Umbraco.Web/packages.config b/src/Umbraco.Web/packages.config index 951a9b113d..b28fa9160a 100644 --- a/src/Umbraco.Web/packages.config +++ b/src/Umbraco.Web/packages.config @@ -2,7 +2,7 @@ - + From 94da555fea5b385ff03c7d28cc2fbc1d0c77ad8b Mon Sep 17 00:00:00 2001 From: antoine Date: Wed, 12 Nov 2014 11:37:35 +0100 Subject: [PATCH 13/15] Some styles unification for the grid's prevalues --- .../src/less/gridview.less | 128 +++---- .../src/views/propertyeditors/grid/grid.html | 2 +- .../propertyeditors/grid/grid.prevalues.html | 362 +++++++++--------- 3 files changed, 233 insertions(+), 259 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/gridview.less b/src/Umbraco.Web.UI.Client/src/less/gridview.less index 16d49939d4..eeb763ba8a 100644 --- a/src/Umbraco.Web.UI.Client/src/less/gridview.less +++ b/src/Umbraco.Web.UI.Client/src/less/gridview.less @@ -162,6 +162,7 @@ bottom: 0px; left: 0; right: 0; + margin: 0 20px 1px 0; } .usky-grid .usky-control:hover .cell-tools-add{ @@ -478,7 +479,7 @@ /**************************************************************************************************/ .usky-grid .usky-cell{ - padding-bottom: 20px; + padding-bottom: 15px; } .usky-grid .usky-control{ @@ -499,7 +500,7 @@ .usky-grid .usky-control-inner{ padding: 5px; margin-right: 45px; - margin-bottom: 10px; + margin-bottom: 15px; border: 1px dashed transparent; } @@ -559,57 +560,6 @@ /* template column */ /**************************************************************************************************/ - .usky-grid .usky-templates-columns .td{ - border: none !important; - vertical-align: middle; - } - -.usky-grid .usky-templates-columns .td i{ - color: @gray; - opacity: 0.8 -} - -.usky-grid .mainTbpt:hover { - border-color:@blue; -} - -.usky-grid .mainTbpt { - cursor:pointer; - border-collapse: separate; - min-height: 35px; - border: 2px solid @grayLight; - margin:0px; - padding: 1px; -} - -.usky-grid .mainTdpt { - padding: 1px; -} - -.usky-grid .mainTbpt { - height: auto; -} - -.usky-grid .mainTdpt { - height: 11px; - margin: 0; - overflow: hidden; - border: 1px dashed #d9d9d9; - display: block; - float: left; -} - -.mainTdpt span{ - width: 100%; - display: block; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - margin: 0 1px; - height: 10px; - background: @grayLight -} - /* New template preview */ .usky-grid { @@ -632,6 +582,7 @@ } .preview-rows { + display: inline-block; position: relative; -webkit-box-sizing: border-box; @@ -642,6 +593,18 @@ border: 2px solid @grayLight; /* @grayLight */ transition: border 200ms linear; + &.prevalues-rows { + margin: 0px 20px 20px 0px; + width: 80px; + float:left; + } + + &.prevalues-templates { + margin: 0px 20px 20px 0px; + float:left; + + } + &:hover { border-color: @blue; cursor: pointer; @@ -679,28 +642,43 @@ min-height: 18px; line-height: 11px; padding: 1px; + + &.prevalues-rows { + min-height: 30px; + } } - .preview-col { - display: block; - float: left; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - width: 33.3%; /* temp value */ - height: 10px; - margin: 0; - border: 1px solid @white; /* @white */ + .preview-rows { + + .preview-col { + + display: block; + float: left; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + width: 33.3%; /* temp value */ + height: 10px; + margin: 0; + border: 1px solid @white; /* @white */ + + .preview-cell { + display: block; + width: 100%; + height: 100%; + background-color: @grayLight; /* @grayLight */ + margin: 0 1px 1px 0; + } + } + + &.prevalues-templates { + .preview-col { + height: 80px; + } + } + + } - .preview-cell { - display: block; - width: 100%; - height: 100%; - background-color: @grayLight; /* @grayLight */ - margin: 0 1px 1px 0; - } - } - .preview-overlay { display: block; width: 100%; @@ -793,12 +771,6 @@ text-align: left; } -.usky-grid-configuration .uSky-templates .uSky-templates-template{ - margin: 0px 20px 20px 0px; - width: 80px; -} - - .usky-grid-configuration .uSky-templates .uSky-templates-template .tb{ max-height: 50px; border-width: 2px !important; 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 7ecf2d4cbb..5740608fb3 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 @@ -171,7 +171,7 @@
+ class="usky-cell-{{control.editor.view}}">
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.prevalues.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.prevalues.html index ca5266fc1f..1d5b3c1543 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.prevalues.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.prevalues.html @@ -1,172 +1,167 @@
-
- + +
- - + -
+
- -
-
Layout
- - - +
- -
-
-
- - + +
- - - -
+
Layout
+ + + + + +
+
+
+
-
- -
- - - - {{currentSection.grid}} - - - -
-
+
+ +
+ + + + {{currentSection.grid}} + + + +
+
+ + +
    +
  • + +
  • +
+ +
+
+ +
+
    + +
  • - -
      -
    • - -
    • -
    - -
    -
    - -
    -
      - -
    • - - - -
      - -
      -
      - -
      +
      -
      - {{layout.name}}
      - {{layout.areas.length}} configurable sections
      -
      +
      + {{layout.name}}
      + {{layout.areas.length}} configurable sections
      +
      -
      -
    • -
    -
    +
    +
  • +
- +
+
- + - Delete section -
+ Delete section +
-
- - - - - - -
+ + + + +
- +
+
- +
+ prevent-default + ng-click="configureLayout()"> + Add new row configuration +
+
Row configuration
- + - -
+ +
- + +
+ + +
    +
- - + +
+ +
    @@ -358,5 +358,7 @@
+
+
From 73003167803e4a034f80b3034acc28766b5cfe2d Mon Sep 17 00:00:00 2001 From: antoine Date: Wed, 12 Nov 2014 13:58:12 +0100 Subject: [PATCH 14/15] grid add button always centered --- .../src/less/gridview.less | 8 +- .../src/views/propertyeditors/grid/grid.html | 426 +++++++++--------- 2 files changed, 217 insertions(+), 217 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/gridview.less b/src/Umbraco.Web.UI.Client/src/less/gridview.less index eeb763ba8a..a221c0aa5a 100644 --- a/src/Umbraco.Web.UI.Client/src/less/gridview.less +++ b/src/Umbraco.Web.UI.Client/src/less/gridview.less @@ -11,6 +11,7 @@ // Sortabel // ------------------------- .usky-grid .ui-sortable-helper { + position:absolute; border: dashed 1px #000 !important; background: #ccc; opacity: 0.4; @@ -162,14 +163,17 @@ bottom: 0px; left: 0; right: 0; - margin: 0 20px 1px 0; + margin: 0 45px 1px 0; + + &.emptyArea{ + margin: 0 0 1px 0; + } } .usky-grid .usky-control:hover .cell-tools-add{ opacity: 1; } - .usky-grid .cell-tools-remove { display:inline-block; position: absolute; 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 5740608fb3..636dbf2ef6 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,257 +1,253 @@ -
+
-
- - +
-
- -
- -
- -
- -
-
- -
- -
+ -
-
+
- {{layout.name}} +
-
+
-

Add rows to your layout

- - -
- - - - -
-
- - -
- -
- - -
- - -
- - -
-
- - - Are you sure? - Yes - - - -
-
- -
- - - -
- -
- - - -
+
+
- -
+
-
-
-
+
- -
+
+ + {{layout.name}} + +
+ +

Add rows to your layout

+ + +
+ + +
+
+ + +
+ +
+ + +
+ + +
+ + +
+
+ + + Are you sure? + Yes + + + +
+
+ +
+ + + +
+ +
+ + + +
+ +
+ + +
+ +
+
+
+ + +
+ ng-repeat="area in row.areas" ui-sortable="sortableOptionsCell" ng-model="area.controls"> - -
- - -
+
+ class="usky-control"> - -
-
+ +
- - Are you sure? - Yes - + +
+
- + + Are you sure? + Yes + + + +
+ + +
+ + + +
+ + +
+ + + +
+
- -
- - - -
- - -
- - - -
- -
- -
- -
+ +
+
-
- - -
-
- To start, click the - below and add your first element -

-
+ + +
+
+ To start, click the + below and add your first element +

+
-
+
+ + + + + +
+
- - - - -
- +
-
+ +
- +
- + + + +
+ +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ + {{layout.name}} + +
+ + +

+ Add rows to your layout +

+ + +
+
- - - - - -
- -
- -
- -
- -
-
- -
- -
- -
-
- - {{layout.name}} - -
- - -

- Add rows to your layout -

- - -
- - - +
-
-
\ No newline at end of file From 4257a89cc1e05248bf445628610ced8fd06a5dd7 Mon Sep 17 00:00:00 2001 From: antoine Date: Wed, 12 Nov 2014 13:59:48 +0100 Subject: [PATCH 15/15] U4-5793 The three icons (delete, move, settings) seems to fail to appear if the cursor is coming from inside the row. I need to move the cursor out of the row entirely and then back in. Seems like a bug to me. --- .../src/views/propertyeditors/grid/grid.controller.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 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 05682dce29..d6bf819e51 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 @@ -152,8 +152,8 @@ angular.module("umbraco") $scope.overlayMenu.show = true; }; - $scope.closeItemOverlay = function(){ - $scope.currentControl = undefined; + $scope.closeItemOverlay = function () { + $scope.currentControl = null; $scope.overlayMenu.show = false; $scope.overlayMenu.key = undefined; }; @@ -229,6 +229,7 @@ angular.module("umbraco") $scope.removeRow = function (section, $index) { if (section.rows.length > 0) { section.rows.splice($index, 1); + $scope.currentRow = null; $scope.openRTEToolbarId = null; $scope.initContent(); } @@ -360,6 +361,7 @@ angular.module("umbraco") }; $scope.removeControl = function (cell, $index) { + $scope.currentControl = null; cell.controls.splice($index, 1); };