mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-30 01:10:58 +01:00
56aa508f43
Summary: Dropdown menus are entirely dynamic right now and use custom CSS. Begin rebuilding them to use ActionList CSS. This introduces PHUIX components which are basically JS copy/pastes of the PHP PHUI components, just implemented in JS. We have two other dropdowns: policy controls and one in Conpherence. I'll convert those, then implement D8966. Test Plan: {F150418} Reviewers: chad, btrahan Reviewed By: btrahan Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D8973
36 lines
603 B
JavaScript
36 lines
603 B
JavaScript
/**
|
|
* @provides phuix-action-list-view
|
|
* @requires javelin-install
|
|
* javelin-dom
|
|
*/
|
|
|
|
JX.install('PHUIXActionListView', {
|
|
|
|
construct: function() {
|
|
this._items = [];
|
|
},
|
|
|
|
members: {
|
|
_items: null,
|
|
_node: null,
|
|
|
|
addItem: function(item) {
|
|
this._items.push(item);
|
|
this.getNode().appendChild(item.getNode());
|
|
return this;
|
|
},
|
|
|
|
getNode: function() {
|
|
if (!this._node) {
|
|
var attrs = {
|
|
className: 'phabricator-action-list-view'
|
|
};
|
|
|
|
this._node = JX.$N('ul', attrs);
|
|
}
|
|
|
|
return this._node;
|
|
}
|
|
}
|
|
|
|
});
|