projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9733a18
)
luci-base: ui.js: support clearChoices()/addChoices() for DynLists
author
Jo-Philipp Wich
<jo@mein.io>
Sun, 19 Jan 2020 14:52:58 +0000
(15:52 +0100)
committer
Jo-Philipp Wich
<jo@mein.io>
Sun, 19 Jan 2020 15:15:22 +0000
(16:15 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/ui.js
patch
|
blob
|
history
diff --git
a/modules/luci-base/htdocs/luci-static/resources/ui.js
b/modules/luci-base/htdocs/luci-static/resources/ui.js
index 08196117b0483d42c6c6cb9d0c1c12a18f0ac5ac..08edaa1475a48915e29fa85f1d2842756323471b 100644
(file)
--- a/
modules/luci-base/htdocs/luci-static/resources/ui.js
+++ b/
modules/luci-base/htdocs/luci-static/resources/ui.js
@@
-1555,6
+1555,16
@@
var UIDynamicList = UIElement.extend({
for (var i = 0; i < values.length; i++)
this.addItem(this.node, values[i],
this.choices ? this.choices[values[i]] : null);
+ },
+
+ addChoices: function(values, labels) {
+ var dl = this.node.lastElementChild.firstElementChild;
+ L.dom.callClassMethod(dl, 'addChoices', values, labels);
+ },
+
+ clearChoices: function() {
+ var dl = this.node.lastElementChild.firstElementChild;
+ L.dom.callClassMethod(dl, 'clearChoices');
}
});