@@ -16,7 +16,7 @@ angular.module("umbraco")
|
||||
};
|
||||
|
||||
$scope.scaleDown = function(section){
|
||||
var remove = (section.grid > 1) ? 1 : section.grid;
|
||||
var remove = (section.grid > 1) ? 1 : 0;
|
||||
section.grid = section.grid-remove;
|
||||
};
|
||||
|
||||
@@ -49,9 +49,12 @@ angular.module("umbraco")
|
||||
$scope.currentSection = section;
|
||||
};
|
||||
|
||||
|
||||
$scope.deleteSection = function(index){
|
||||
$scope.currentTemplate.sections.splice(index, 1);
|
||||
$scope.deleteSection = function(section, template) {
|
||||
if ($scope.currentSection === section) {
|
||||
$scope.currentSection = undefined;
|
||||
}
|
||||
var index = template.sections.indexOf(section)
|
||||
template.sections.splice(index, 1);
|
||||
};
|
||||
|
||||
$scope.closeSection = function(){
|
||||
|
||||
@@ -46,6 +46,13 @@
|
||||
</div>
|
||||
</umb-control-group>
|
||||
|
||||
<umb-control-group hide-label="true">
|
||||
<i class="icon-delete red"></i>
|
||||
<a class="btn btn-small btn-link" href="" ng-click="deleteSection(currentSection, currentLayout)">
|
||||
<localize key="general_delete" class="ng-isolate-scope ng-scope">Delete</localize>
|
||||
</a>
|
||||
</umb-control-group>
|
||||
|
||||
|
||||
<umb-control-group hide-label="true">
|
||||
<ul class="unstyled">
|
||||
|
||||
@@ -14,7 +14,7 @@ function RowConfigController($scope) {
|
||||
};
|
||||
|
||||
$scope.scaleDown = function(section) {
|
||||
var remove = (section.grid > 1) ? 1 : section.grid;
|
||||
var remove = (section.grid > 1) ? 1 : 0;
|
||||
section.grid = section.grid - remove;
|
||||
};
|
||||
|
||||
@@ -58,9 +58,14 @@ function RowConfigController($scope) {
|
||||
}
|
||||
};
|
||||
|
||||
$scope.deleteArea = function(index) {
|
||||
$scope.currentRow.areas.splice(index, 1);
|
||||
$scope.deleteArea = function (cell, row) {
|
||||
if ($scope.currentCell === cell) {
|
||||
$scope.currentCell = undefined;
|
||||
}
|
||||
var index = row.areas.indexOf(cell)
|
||||
row.areas.splice(index, 1);
|
||||
};
|
||||
|
||||
$scope.closeArea = function() {
|
||||
$scope.currentCell = undefined;
|
||||
};
|
||||
|
||||
@@ -57,6 +57,12 @@
|
||||
</div>
|
||||
</umb-control-group>
|
||||
|
||||
<umb-control-group hide-label="true">
|
||||
<i class="icon-delete red"></i>
|
||||
<a class="btn btn-small btn-link" href="" ng-click="deleteArea(currentCell, currentRow)">
|
||||
<localize key="general_delete" class="ng-isolate-scope ng-scope">Delete</localize>
|
||||
</a>
|
||||
</umb-control-group>
|
||||
|
||||
<umb-control-group hide-label="true">
|
||||
<ul class="unstyled">
|
||||
|
||||
Reference in New Issue
Block a user