From a4bf118f6da00bf9f4163bbdb10fa804361c7aef Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Thu, 12 Nov 2015 09:53:21 +0100 Subject: [PATCH] fix cell padding, add rows --- .../src/less/gridview.less | 62 +++-- .../src/views/propertyeditors/grid/grid.html | 219 ++++++++++-------- 2 files changed, 162 insertions(+), 119 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/gridview.less b/src/Umbraco.Web.UI.Client/src/less/gridview.less index 6f0bf51150..38b12da603 100644 --- a/src/Umbraco.Web.UI.Client/src/less/gridview.less +++ b/src/Umbraco.Web.UI.Client/src/less/gridview.less @@ -95,22 +95,27 @@ } */ +/* .umb-grid .tr { } + */ .umb-grid .middle { text-align: center; } +/* .umb-grid .mainTb { border-collapse: separate; } + */ .umb-grid .mainTd { position:relative; } + // COLUMN // ------------------------- .umb-grid .umb-column { @@ -146,15 +151,20 @@ // ------------------------- .umb-grid .umb-cell{ position: relative; - border: 2px solid transparent; - //border: 1px dashed rgba(0,0,0,0); - min-height:127px; - background-color: @grayLighter; - box-sizing: border-box; - transition: border 100ms linear; + background-color: #ffffff; + padding: 10px; } -.umb-grid .umb-cell:hover { +.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; cursor: pointer; } @@ -218,11 +228,11 @@ .umb-grid .cell-tools-remove { display:inline-block; - position: absolute; - top: 0px; - right: 5px; - text-align: right; - z-index: 500; + //position: absolute; + //top: 0px; + //right: 5px; + //text-align: right; + //z-index: 500; } .umb-grid .cell-tools-remove .iconBox:hover, .umb-grid .cell-tools-remove .iconBox:hover *{ @@ -232,11 +242,11 @@ .umb-grid .cell-tools-move { display:inline-block; - position: absolute; - top: 33px; - right: 5px; - z-index: 500; - cursor: move + //position: absolute; + //top: 33px; + //right: 5px; + //z-index: 500; + //cursor: move } .umb-grid .cell-tools-edit{ @@ -286,14 +296,28 @@ } */ +.umb-grid .umb-row-title { + margin-bottom: 20px; + display: block; + padding-left: 10px; + padding-right: 10px; +} + .umb-grid ins.item-label { text-transform: uppercase; font-size: 13px; color: @gray; - margin-bottom: 20px; font-weight: bold; text-decoration: none; - display: block; + display: inline-block; +} + +.umb-grid .row-tools { + display: inline-block; +} + +.umb-grid .umb-add-row { + text-align: center; } /* 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 754cd8df98..bbe727fa6b 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 @@ -51,63 +51,62 @@
-
+ + +
- -
+
- -
-
+ {{row.name}} - - - - - + +
- -
-
+ +
+
-
- - - -
+ + + + + -
- - - -
+ +
+
+ +
+ + + +
+ +
+ + + +
+ +
-
- {{row.name}} -
@@ -117,78 +116,85 @@ class="td mainTd umb-cell" ng-class="{last:$last,first:$first, infohighlight:currentInfohighlightArea == area, warnhighlight:currentWarnhighlightArea == area}" - ng-repeat="area in row.areas" ui-sortable="sortableOptionsCell" ng-model="area.controls"> + ng-repeat="area in row.areas" + ui-sortable="sortableOptionsCell" + ng-model="area.controls" + ng-click="addItemOverlay($event, area, 0, area.$uniqueId);"> - -
+
- -
+ +
- -
-
+ +
- - - - - + +
+
- -
-
+ + + + + - -
- - - -
+ +
+
- -
- - - -
+ +
+ + + +
-
+ +
+ + + +
-
+
- {{control.editor.name}} +
- -
-
-
-
+ {{control.editor.name}} + + +
+
+
+
+
+ -
+
+ + + + + + + +
+ +