Permissions form: right-click event fix (after refreshing dataset list)
@@ -5,10 +5,14 @@ export default function($injector, $window, $timeout) {
restrict: 'A',
link: function(scope, element, attrs) {
const contextMenu = $injector.get(attrs.target);
- const locals = {};
const wnd = angular.element($window);
const triggerOnEvent = attrs.triggerOnEvent || 'contextmenu';
+ function open(event) {
+ const pointerPosition = getPositionPropertiesOfEvent(event);
+ const cssProperties = getCssPropertiesOfEvent(event);
+ const currentTarget = event.currentTarget;
+ const locals = {};
if (attrs.locals) {
const localKeys = attrs.locals.split(',').map(function(local) {
return local.trim();
@@ -17,11 +21,6 @@ export default function($injector, $window, $timeout) {
locals[key] = scope[key];
});
}
-
- function open(event) {
- const pointerPosition = getPositionPropertiesOfEvent(event);
- const cssProperties = getCssPropertiesOfEvent(event);
- const currentTarget = event.currentTarget;
contextMenu.bindController(locals);
const shouldOpenContextMenuPromise = contextMenu.controllerImpl && contextMenu.controllerImpl.shouldOpenMenuPromise
? contextMenu.controllerImpl.shouldOpenMenuPromise()
