deselect everything when clicking outside a row

This commit is contained in:
Mads Rasmussen
2015-11-18 12:01:24 +01:00
parent 72311a7808
commit 6f15b9fb1e
2 changed files with 8 additions and 1 deletions

View File

@@ -223,6 +223,12 @@ angular.module("umbraco")
event.stopPropagation();
};
$scope.clickOutsideRow = function() {
$scope.currentRow = null;
$scope.currentCell = null;
$scope.currentControl = null;
};
$scope.setWarnighlightRow = function (row) {
$scope.currentWarnhighlightRow = row;
};

View File

@@ -55,7 +55,8 @@
<div class="umb-row"
ng-repeat="row in section.rows"
ng-click="clickRow(row, $event)"
ng-class="{'-active': currentRow === row}">
ng-class="{'-active': currentRow === row}"
on-outside-click="clickOutsideRow()">
<div class="umb-row-title-bar">