Highlight the currently selected policy in the policy dropdown control thing
Summary: Ref T603. Make this a little easier to use by highlighting the current value. Test Plan: See screenshot. Reviewers: chad, btrahan Reviewed By: chad CC: chad, aran Maniphest Tasks: T603 Differential Revision: https://secure.phabricator.com/D7289
This commit is contained in:
@@ -17,10 +17,15 @@ JX.install('PhabricatorMenuItem', {
|
||||
_action : null,
|
||||
|
||||
render : function() {
|
||||
var attrs = {
|
||||
href: this.getHref(),
|
||||
meta: { item: this },
|
||||
className: this.getSelected() ? 'phabricator-menu-item-selected' : null
|
||||
};
|
||||
|
||||
if (this.getDisabled()) {
|
||||
return JX.$N('span', this.getName());
|
||||
return JX.$N('span', attrs, this.getName());
|
||||
} else {
|
||||
var attrs = { href : this.getHref(), meta : { item : this } };
|
||||
return JX.$N('a', attrs, this.getName());
|
||||
}
|
||||
},
|
||||
@@ -31,9 +36,10 @@ JX.install('PhabricatorMenuItem', {
|
||||
},
|
||||
|
||||
properties : {
|
||||
name : '',
|
||||
href : '',
|
||||
disabled : false
|
||||
name: '',
|
||||
href: '',
|
||||
disabled: false,
|
||||
selected: false
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user