1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-23 23:32:40 +01:00
phorge-phorge/webroot/rsrc/js/application/projects/behavior-boards-dropdown.js
epriestley 60157ed40d Move general workboard actions to "Manage Board" dropdown
Summary: See D9719.

Test Plan:
  - Used hide/show columns.
  - Used "add column".
  - Filtered board.

{F170133}

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9726
2014-06-25 12:30:53 -07:00

35 lines
771 B
JavaScript

/**
* @provides javelin-behavior-boards-dropdown
* @requires javelin-behavior
* javelin-dom
* javelin-stratcom
* phuix-dropdown-menu
*/
JX.behavior('boards-dropdown', function() {
JX.Stratcom.listen('click', 'boards-dropdown-menu', function(e) {
var data = e.getNodeData('boards-dropdown-menu');
if (data.menu) {
return;
}
e.kill();
var list = JX.$H(data.items).getFragment().firstChild;
var button = e.getNode('boards-dropdown-menu');
data.menu = new JX.PHUIXDropdownMenu(button);
data.menu.setContent(list);
data.menu.open();
JX.DOM.listen(list, 'click', 'tag:a', function(e) {
if (!e.isNormalClick()) {
return;
}
data.menu.close();
});
});
});