Merge pull request #1483 from opf/feature/column-context-menu-positioning

Remove drop down anchor right from drop down associated to ‘id’ column
pull/1485/head
manwithtwowatches 11 years ago
commit 0bab4f9ec8
  1. 11
      app/assets/javascripts/angular/ui_components/has-dropdown-menu-directive.js
  2. 4
      public/templates/work_packages/column_context_menu.html

@ -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);
});

@ -1,4 +1,6 @@
<div id="column-context-menu" class="action-menu dropdown-relative dropdown-anchor-right">
<div id="column-context-menu"
class="action-menu dropdown-relative"
ng-class="{'dropdown-anchor-right': column && column.name !== 'id'}">
<ul class="menu">
<li ng-if="!!column.sortable" ng-click="sortAscending(column.name)">
<a href="#">

Loading…
Cancel
Save