|
|
@ -64,18 +64,18 @@ angular.module('openproject.uiComponents') |
|
|
|
locals[key] = scope[key]; |
|
|
|
locals[key] = scope[key]; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
function toggle() { |
|
|
|
function toggle(event) { |
|
|
|
active() ? close() : open(); |
|
|
|
active() ? close() : open(event); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function active() { |
|
|
|
function active() { |
|
|
|
return contextMenu.active() && ctrl.opened(); |
|
|
|
return contextMenu.active() && ctrl.opened(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function open() { |
|
|
|
function open(event) { |
|
|
|
ctrl.open(); |
|
|
|
ctrl.open(); |
|
|
|
|
|
|
|
|
|
|
|
contextMenu.open(locals) |
|
|
|
contextMenu.open(event.target, locals) |
|
|
|
.then(function(element) { |
|
|
|
.then(function(element) { |
|
|
|
menuElement = element; |
|
|
|
menuElement = element; |
|
|
|
}); |
|
|
|
}); |
|
|
@ -96,7 +96,7 @@ angular.module('openproject.uiComponents') |
|
|
|
event.stopPropagation(); |
|
|
|
event.stopPropagation(); |
|
|
|
|
|
|
|
|
|
|
|
scope.$apply(function() { |
|
|
|
scope.$apply(function() { |
|
|
|
toggle(); |
|
|
|
toggle(event); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// set css position parameters after the digest has been completed
|
|
|
|
// set css position parameters after the digest has been completed
|
|
|
|