Make the context menu drop down toggleable

pull/1342/head
Till Breuer 11 years ago
parent e2815ded8f
commit bd2995bd35
  1. 7
      app/assets/javascripts/angular/directives/components/with-dropdown.js

@ -69,15 +69,16 @@ angular.module('openproject.uiComponents')
element.on('click', function (event) {
var trigger = jQuery(this),
dropdown = jQuery("#" + attributes.dropdownId);
var trigger = jQuery(this),
dropdown = jQuery("#" + attributes.dropdownId),
showDropdown = dropdown.is(':hidden');
event.preventDefault();
event.stopPropagation();
scope.$emit('hideAllDropdowns');
if (showDropdown) dropdown.show();
dropdown.show();
position(dropdown, trigger);
});
}

Loading…
Cancel
Save