From bd38e2ebeac61bb7a1c6855ca2b91ad932858895 Mon Sep 17 00:00:00 2001 From: Till Breuer Date: Tue, 17 Jun 2014 17:55:25 +0200 Subject: [PATCH] =?UTF-8?q?Remove=20drop=20down=20anchor=20right=20from=20?= =?UTF-8?q?drop=20down=20associated=20to=20=E2=80=98id=E2=80=99=20column?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui_components/has-dropdown-menu-directive.js | 11 +++++++++-- .../templates/work_packages/column_context_menu.html | 4 +++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/angular/ui_components/has-dropdown-menu-directive.js b/app/assets/javascripts/angular/ui_components/has-dropdown-menu-directive.js index c3ad1f56b5..39e3d149d4 100644 --- a/app/assets/javascripts/angular/ui_components/has-dropdown-menu-directive.js +++ b/app/assets/javascripts/angular/ui_components/has-dropdown-menu-directive.js @@ -76,8 +76,8 @@ angular.module('openproject.uiComponents') ctrl.open(); contextMenu.open(locals) - .then(function(menuElement) { - menuElement.css(getCssPositionProperties(menuElement, element)); + .then(function(element) { + menuElement = element; }); } @@ -87,6 +87,10 @@ angular.module('openproject.uiComponents') contextMenu.close(); } + function positionDropdown() { + menuElement.css(getCssPositionProperties(menuElement, element)); + } + element.bind(triggerOnEvent, function(event) { event.preventDefault(); event.stopPropagation(); @@ -95,6 +99,9 @@ angular.module('openproject.uiComponents') toggle(); }); + // set css position parameters after the digest has been completed + if (contextMenu.active()) positionDropdown(); + scope.$root.$broadcast('openproject.markDropdownsAsClosed', element); }); diff --git a/public/templates/work_packages/column_context_menu.html b/public/templates/work_packages/column_context_menu.html index 7bf00d39d6..47b27fdece 100644 --- a/public/templates/work_packages/column_context_menu.html +++ b/public/templates/work_packages/column_context_menu.html @@ -1,4 +1,6 @@ -