1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-19 16:58:48 +02:00
phorge-phorge/webroot/rsrc/js/phuix/PHUIXActionListView.js
epriestley 56aa508f43 Begin rebuilding dropdown menus on ActionList
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
2014-05-05 10:56:14 -07:00

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