From ac2cf769d5b10037aa9d2d2af4b160ddc7b638bd Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Thu, 12 Nov 2015 13:26:04 +0100 Subject: [PATCH] refactor cells so cells with and without editors are separate divs --- .../src/less/gridview.less | 28 ++- .../src/views/propertyeditors/grid/grid.html | 169 ++++++++---------- 2 files changed, 100 insertions(+), 97 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/gridview.less b/src/Umbraco.Web.UI.Client/src/less/gridview.less index 22e7b42a67..c9ae307efe 100644 --- a/src/Umbraco.Web.UI.Client/src/less/gridview.less +++ b/src/Umbraco.Web.UI.Client/src/less/gridview.less @@ -149,26 +149,42 @@ // CELL // ------------------------- -.umb-grid .umb-cell{ +.umb-grid .umb-cell { position: relative; background-color: #ffffff; padding: 10px; } .umb-grid .umb-cell-content { - background-color: @grayLighter; min-height: 130px; display: block; - border: 2px solid transparent; box-sizing: border-box; - transition: border 100ms linear; } -.umb-grid .umb-cell-content:hover { - border: 2px solid @blue; +.umb-grid .umb-cell-content.-placeholder { + background-color: @grayLighter; + border-width: 2px; + border-style: solid; + border-color: transparent; + transition: border-color 100ms linear; +} + +.umb-grid .umb-cell-content.-placeholder:hover { + border-color: @blue; cursor: pointer; } +.umb-grid .umb-cell-content.-has-editors { + background-color: transparent; + border-style: solid; + border-width: 1px; + border-color: @grayLight; +} + +.umb-grid .umb-cell-content.-has-editors:hover { + cursor: auto; +} + .umb-grid .cell-tools { transition: all .20s ease-in-out; -moz-transition: all .20s ease-in-out; 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 ce0da74c2b..e12a4bc7a1 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 @@ -111,116 +111,103 @@
-
+ ng-model="area.controls"> -
+ + - -
+ +
- -
+ +
- -
-
+ +
- - - - - + +
+
- -
-
+ + + + + - -
- - - -
+ +
+
- -
- - - -
+ +
+ + + +
-
+ +
+ + + +
-
+
- {{control.editor.name}} +
- -
-
-
-
- - + {{control.editor.name}} -
+ +
+
+
+
+ + - - - Add editor - - +
+