Fxes grid datatype config to handle cols > 12 and <= 0

This commit is contained in:
per ploug
2014-12-04 12:27:10 +01:00
parent aa9c753455
commit 6738a25bfa
2 changed files with 5 additions and 2 deletions

View File

@@ -149,6 +149,9 @@ angular.module("umbraco")
return ((spans / $scope.model.value.columns) * 100).toFixed(1);
};
$scope.zeroWidthFilter = function (cell) {
return cell.grid > 0;
};
/****************
Config

View File

@@ -17,7 +17,7 @@
<div class="preview-row">
<div class="preview-col"
ng-class="{last:$last}"
ng-repeat="section in template.sections"
ng-repeat="section in template.sections | filter:zeroWidthFilter"
ng-style="{width: percentage(section.grid) + '%', height: '60px'}">
<div class="preview-cell"></div>
</div>
@@ -63,7 +63,7 @@
<div class="preview-row">
<div class="preview-col"
ng-class="{last:$last}"
ng-repeat="area in layout.areas"
ng-repeat="area in layout.areas | filter:zeroWidthFilter"
ng-style="{width: percentage(area.grid) + '%'}">
<div class="preview-cell"></div>