Merge branch 'temp-U4-7366' of https://github.com/umbraco/Umbraco-CMS into temp-U4-7366

This commit is contained in:
Rune Strand
2015-11-25 23:07:50 +01:00
2 changed files with 23 additions and 4 deletions

View File

@@ -173,8 +173,24 @@ angular.module('umbraco.directives')
scope.$apply(attrs.onOutsideClick);
}
$timeout(function(){
$(document).on("click", oneTimeClick);
if ("bindClickOn" in attrs) {
scope.$watch(function() {
return attrs.bindClickOn;
}, function(newValue) {
if (newValue === "true") {
$(document).on("click", oneTimeClick);
} else {
$(document).off("click", oneTimeClick);
}
});
} else {
$(document).on("click", oneTimeClick);
}
scope.$on("$destroy", function() {
$(document).off("click", oneTimeClick);

View File

@@ -58,7 +58,8 @@
'-has-config': hasConfig(row),
'-active': row.active,
'-active-child': hasActiveChild(row, 'row')}"
on-outside-click="clickOutsideRow($index, section.rows)">
on-outside-click="clickOutsideRow($index, section.rows)"
bind-click-on="{{row.active}}">
<div class="umb-row-title-bar">
@@ -109,7 +110,8 @@
'-active-child': hasActiveChild(area, 'cell')}"
ng-model="area.controls"
ng-click="clickCell($index, row.areas)"
on-outside-click="clickOutsideCell($index, row.areas)">
on-outside-click="clickOutsideCell($index, row.areas)"
bind-click-on="{{area.active}}">
<!-- Cell placeholder -->
<div class="umb-cell-content -placeholder" ng-if="area.controls.length === 0">
@@ -138,7 +140,8 @@
ng-repeat="control in area.controls"
ng-click="clickControl($index, area.controls)"
ng-class="{'-active': control.active}"
on-outside-click="clickOutsideControl($index, area.controls)">
on-outside-click="clickOutsideControl($index, area.controls)"
bind-click-on="{{control.active}}">
<div class="umb-control-click-overlay" ng-show="!control.active"></div>