mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +01:00
60157ed40d
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
35 lines
771 B
JavaScript
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();
|
|
});
|
|
});
|
|
|
|
|
|
});
|