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.Client/src/less/gridview.less b/src/Umbraco.Web.UI.Client/src/less/gridview.less index 1367faf3c7..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,13 +163,17 @@ bottom: 0px; left: 0; right: 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; @@ -186,7 +191,7 @@ .usky-grid .cell-tools-move { display:inline-block; position: absolute; - top: 40px; + top: 33px; right: 5px; z-index: 500; cursor: move @@ -194,7 +199,7 @@ .usky-grid .cell-tools-edit{ position: absolute; - top: 80px; + top: 66px; right: 5px; } @@ -229,11 +234,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 +332,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 +344,7 @@ background: @blue !important; color: white !important; border-color: @blue !important; + text-decoration:none; } .usky-grid .iconBox a:hover { @@ -370,12 +376,10 @@ .usky-grid .iconBox i { font-size:16px !important; color: #5F5F5F; + display:block; } - - - .usky-grid ul { display:inline-block; list-style:none; @@ -479,22 +483,19 @@ /**************************************************************************************************/ .usky-grid .usky-cell{ - padding-bottom: 20px; - } - - .usky-grid .usky-row{ - + padding-bottom: 15px; } .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; @@ -503,7 +504,7 @@ .usky-grid .usky-control-inner{ padding: 5px; margin-right: 45px; - margin-bottom: 10px; + margin-bottom: 15px; border: 1px dashed transparent; } @@ -563,57 +564,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 { @@ -636,6 +586,7 @@ } .preview-rows { + display: inline-block; position: relative; -webkit-box-sizing: border-box; @@ -646,6 +597,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; @@ -683,28 +646,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%; @@ -797,12 +775,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/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 }); 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){ 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..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; }; @@ -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){ @@ -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(); } @@ -252,14 +253,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 +273,13 @@ angular.module("umbraco") } }; + $scope.setInfohighlightArea = function (cell) { + $scope.currentInfohighlightArea = cell; + }; + $scope.disableInfohighlightArea = function () { + $scope.currentInfohighlightArea = null; + }; // ********************************************* @@ -294,22 +301,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) { @@ -356,6 +361,7 @@ angular.module("umbraco") }; $scope.removeControl = function (cell, $index) { + $scope.currentControl = null; cell.controls.splice($index, 1); }; 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..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,246 +1,253 @@ -
+
-
- - +
-
- -
- -
- -
- -
-
- -
- -
+ -
-
+
- {{layout.name}} +
-
+
-

Add rows to your layout

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

Add rows to your layout

+ + +
+ + +
+
+ + +
+ +
+ + +
+ + +
+ + +
+
+ + + Are you sure? + Yes + + + +
+
+ +
+ + + +
+ +
+ + + +
+ +
+ + +
+ +
+
+
+ + +
+ + +
+ class="usky-control"> - -
-
+ +
- - Are you sure? - Yes - + +
+
- + + Are you sure? + Yes + + + +
-
- -
-
- + + + + +
+ + + +
+
-
- - - -
-
- -
- -
+ +
+
-
- - - -
+ + +
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 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 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/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 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/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/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, 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)); + + } } 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; } 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 @@ - +