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:
@@ -10,6 +10,7 @@
|
||||
JX.behavior('policy-control', function(config) {
|
||||
var control = JX.$(config.controlID);
|
||||
var input = JX.$(config.inputID);
|
||||
var value = config.value;
|
||||
|
||||
var menu = new JX.PhabricatorDropdownMenu(control)
|
||||
.setWidth(260);
|
||||
@@ -39,8 +40,13 @@ JX.behavior('policy-control', function(config) {
|
||||
JX.DOM.find(control, 'span', 'policy-label'),
|
||||
render);
|
||||
input.value = phid;
|
||||
value = phid;
|
||||
}, phid, render));
|
||||
|
||||
if (phid == value) {
|
||||
item.setSelected(true);
|
||||
}
|
||||
|
||||
menu.addItem(item);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user