From 49a374dbcace09975a220d3a869afe263bd61a03 Mon Sep 17 00:00:00 2001 From: per ploug Date: Thu, 26 Jun 2014 23:36:04 +0200 Subject: [PATCH] Fixing various grid bugs with the new structure --- .../src/less/gridview.less | 2 +- .../directives/html/umb-control-group.html | 4 +- .../propertyeditors/grid/editors/rte.html | 2 +- .../propertyeditors/grid/grid.controller.js | 600 +++++++++--------- .../src/views/propertyeditors/grid/grid.html | 6 +- .../grid/grid.prevalues.controller.js | 8 +- .../propertyeditors/grid/grid.prevalues.html | 45 +- .../Views/Partials/Grid/bootstrap3.cshtml | 12 +- 8 files changed, 352 insertions(+), 327 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/gridview.less b/src/Umbraco.Web.UI.Client/src/less/gridview.less index 5a6b9e17ae..0d21573ab3 100644 --- a/src/Umbraco.Web.UI.Client/src/less/gridview.less +++ b/src/Umbraco.Web.UI.Client/src/less/gridview.less @@ -241,7 +241,7 @@ // CONTROL PLACEHOLDER // ------------------------- .usky-grid .usky-control-placeholder { - min-height: 100px; + min-height: 50px; position: relative; text-align: center; text-align: -moz-center; diff --git a/src/Umbraco.Web.UI.Client/src/views/directives/html/umb-control-group.html b/src/Umbraco.Web.UI.Client/src/views/directives/html/umb-control-group.html index 7284e96cc4..9d144d79d3 100644 --- a/src/Umbraco.Web.UI.Client/src/views/directives/html/umb-control-group.html +++ b/src/Umbraco.Web.UI.Client/src/views/directives/html/umb-control-group.html @@ -1,7 +1,7 @@
-
+
-
+
\ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.prevalues.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.prevalues.controller.js index 8ee402ab7c..095b0bb04c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.prevalues.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.prevalues.controller.js @@ -12,7 +12,6 @@ angular.module("umbraco") } ] }, - { name: "2 column", sections: [ @@ -24,7 +23,6 @@ angular.module("umbraco") } ] }, - { name: "2 column reversed", sections: [ @@ -45,7 +43,7 @@ angular.module("umbraco") areas: [ { grid: 12, - editors: ["Headline","subHeadline"] + editors: ["headline"] } ] }, @@ -60,9 +58,7 @@ angular.module("umbraco") } ] } - ], - - gridConfigPath: "views/propertyeditors/grid/config/grid.default.config.js" + ] }; 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 9976f81875..6f9e4fad65 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 @@ -97,15 +97,38 @@

-
    -
  • - -
  • -
+ +
+
    + +
  • + + + + + +
    + {{layout.name}}
    + {{layout.areas.length}} configurable areas
    +
    + +
    +
  • +
+
@@ -180,7 +203,7 @@ - +
@@ -226,7 +249,7 @@ ng-model="currentArea.allowAll" ng-checked="currentArea.allowed === undefined" ng-change="toggleCollection(currentArea.allowed, currentArea.allowAll)" /> - Allow all layouts + Allow all editors diff --git a/src/Umbraco.Web.UI/Views/Partials/Grid/bootstrap3.cshtml b/src/Umbraco.Web.UI/Views/Partials/Grid/bootstrap3.cshtml index 284a8423c3..abe52adea8 100644 --- a/src/Umbraco.Web.UI/Views/Partials/Grid/bootstrap3.cshtml +++ b/src/Umbraco.Web.UI/Views/Partials/Grid/bootstrap3.cshtml @@ -8,20 +8,20 @@
- @foreach (var column in Model.columns) + @foreach (var section in Model.sections) { -
- @foreach (var row in column.rows) +
+ @foreach (var row in section.rows) {
- @foreach (var cell in row.cells) + @foreach (var area in row.areas) { -
+
- @foreach (var control in cell.controls) + @foreach (var control in area.controls) { if (control != null && control.editor != null && control.editor.view != null) {