Added labels to show when styles/config are added to rows/cells
This commit is contained in:
@@ -790,6 +790,59 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Has Config
|
||||
// -------------------------
|
||||
|
||||
.umb-grid-has-config {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
font-size: 12px;
|
||||
color: fade(@black, 44);
|
||||
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
.umb-row.-active {
|
||||
.umb-grid-has-config {
|
||||
color: fade(@white, 66);
|
||||
}
|
||||
|
||||
.umb-cell {
|
||||
.umb-grid-has-config {
|
||||
color: fade(@black, 44);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.umb-row.-active.-editor-active {
|
||||
.umb-grid-has-config {
|
||||
color: fade(@black, 44);
|
||||
}
|
||||
}
|
||||
|
||||
.umb-cell {
|
||||
.umb-grid-has-config {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
}
|
||||
|
||||
&.-active {
|
||||
.umb-grid-has-config {
|
||||
color: @blue;
|
||||
}
|
||||
}
|
||||
|
||||
&.-has-config {
|
||||
.cell-tools {
|
||||
color: @blue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Overlay
|
||||
|
||||
@@ -205,6 +205,20 @@ angular.module("umbraco")
|
||||
|
||||
};
|
||||
|
||||
|
||||
// Check if row/cell has any styles or configerations, return true/false
|
||||
$scope.hasConfig = function(object) {
|
||||
var hasSettings = false;
|
||||
|
||||
if(_.isEmpty(object.styles) && _.isEmpty(object.config)) {
|
||||
hasSettings = false;
|
||||
} else {
|
||||
hasSettings = true;
|
||||
}
|
||||
|
||||
return hasSettings;
|
||||
};
|
||||
|
||||
// *********************************************
|
||||
// Template management functions
|
||||
// *********************************************
|
||||
@@ -610,6 +624,7 @@ angular.module("umbraco")
|
||||
original.styles = row.styles;
|
||||
original.config = row.config;
|
||||
|
||||
|
||||
//sync area configuration
|
||||
_.each(original.areas, function (area, areaIndex) {
|
||||
|
||||
|
||||
@@ -56,10 +56,13 @@
|
||||
ng-repeat="row in section.rows"
|
||||
ng-click="clickRow(row, $event)"
|
||||
ng-class="{
|
||||
'-has-config': hasConfig(row),
|
||||
'-active': currentRow === row,
|
||||
'-editor-active': currentCell !== null && currentRow === row || currentControl !== null && currentRow === row}"
|
||||
on-outside-click="clickOutsideRow()">
|
||||
|
||||
|
||||
|
||||
<div class="umb-row-title-bar">
|
||||
|
||||
<div class="umb-row-title">{{row.name}}</div>
|
||||
@@ -88,6 +91,10 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="umb-grid-has-config" ng-if="hasConfig(row)">
|
||||
Styles is applied
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- row container -->
|
||||
@@ -111,6 +118,7 @@
|
||||
'first':$first,
|
||||
'infohighlight':currentInfohighlightArea == area,
|
||||
'warnhighlight':currentWarnhighlightArea == area,
|
||||
'-has-config' :hasConfig(area),
|
||||
'-active': currentCell == area}"
|
||||
ng-model="area.controls"
|
||||
ng-click="clickCell(area, row, $event)">
|
||||
@@ -128,6 +136,10 @@
|
||||
ng-class="{'-active': currentCell == area}"
|
||||
ui-sortable="sortableOptionsCell">
|
||||
|
||||
<div class="umb-grid-has-config" ng-if="hasConfig(area)">
|
||||
Styles is applied
|
||||
</div>
|
||||
|
||||
<div class="cell-tools" ng-if="currentCell == area">
|
||||
<div class="cell-tool" ng-click="editGridItemSettings(area, 'cell')">
|
||||
<i class="icon-settings"></i>
|
||||
|
||||
Reference in New Issue
Block a user