From 601fef873a0f878c8c7dd7b9b1878156dce0a040 Mon Sep 17 00:00:00 2001 From: per ploug Date: Fri, 27 Jun 2014 11:50:03 +0200 Subject: [PATCH] Found a couple of minor issues while testing --- src/Umbraco.Web.UI.Client/src/less/gridview.less | 4 ++-- .../src/views/propertyeditors/grid/grid.controller.js | 6 ++++-- .../src/views/propertyeditors/grid/grid.html | 10 ++++------ .../src/views/propertyeditors/grid/grid.prevalues.html | 2 +- .../Views/Partials/Grid/bootstrap3.cshtml | 8 ++++---- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/gridview.less b/src/Umbraco.Web.UI.Client/src/less/gridview.less index 0d21573ab3..1a727cbc2a 100644 --- a/src/Umbraco.Web.UI.Client/src/less/gridview.less +++ b/src/Umbraco.Web.UI.Client/src/less/gridview.less @@ -7,7 +7,7 @@ // Sortabel // ------------------------- .usky-grid .ui-sortable-helper { - border: dashed 1px #000; + border: dashed 1px #$000; background: #ccc; opacity: 0.4; height: 50px !important; @@ -493,7 +493,7 @@ } .usky-grid .usky-control{ - margin: 30px; + margin: 15px 30px 0px 10px; padding: 5px; } 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 27037a5b89..0a2b310f5b 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 @@ -74,6 +74,8 @@ angular.module("umbraco") $scope.addRow = function (column, layout) { //copy the selected layout into the rows collection var row = angular.copy(layout); + $scope.initRow(row); + column.rows.push(row); }; @@ -239,8 +241,8 @@ angular.module("umbraco") var layouts = $scope.model.config.items.layouts; if(section.allowed && section.allowed.length > 0){ - return _.filter(layouts, function(layout){ - section.$allowedLayouts = _.indexOf(section.allowed, layout.name) >= 0; + section.$allowedLayouts = _.filter(layouts, function(layout){ + return _.indexOf(section.allowed, layout.name) >= 0; }); }else{ section.$allowedLayouts = layouts; 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 ecb86ffa1f..d823806f93 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 @@ -12,7 +12,6 @@
@@ -35,7 +34,7 @@ class="usky-column td" ng-class="{last:$last}" ng-repeat="section in model.value.sections" - ng-init="initSection(section)" + ng-init="initSection(section)" style="width:{{section.$percentage}}%">
@@ -46,7 +45,6 @@ class="usky-row" ng-mouseover="setCurrentRow(row)" ng-mouseleave="disableCurrentRow()" - ng-init="initRow(row)" ng-class="{removingControl:currentRemoveControl == row, movingControl:currentMoveControl == row}"> @@ -94,6 +92,7 @@ class="td mainTd usky-cell" ng-repeat="area in row.areas"> +
+
    -
  • +
  • - -
    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 6f9e4fad65..77b1957753 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 @@ -181,7 +181,7 @@
    {{layout.name}}
    {{layout.areas.length}} configurable areas
    - Delete layout + Delete layout

    diff --git a/src/Umbraco.Web.UI/Views/Partials/Grid/bootstrap3.cshtml b/src/Umbraco.Web.UI/Views/Partials/Grid/bootstrap3.cshtml index abe52adea8..91dd2c02e2 100644 --- a/src/Umbraco.Web.UI/Views/Partials/Grid/bootstrap3.cshtml +++ b/src/Umbraco.Web.UI/Views/Partials/Grid/bootstrap3.cshtml @@ -4,14 +4,14 @@ @if (Model != null && !string.IsNullOrEmpty(Model.ToString())) { - var onlyOneColumn = Model.columns != null ? ((System.Collections.ICollection)Model.columns).Count : 0; + var onlyOneColumn = Model.sections != null ? ((System.Collections.ICollection)Model.sections).Count : 0;
    - @foreach (var section in Model.sections) + @foreach (var s in Model.sections) { -
    - @foreach (var row in section.rows) +
    + @foreach (var row in s.rows) {