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:
f1d10ca
)
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 19:15:52 +0000
(20:15 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit
cc123a03ce738dffae9abf5aefad9b75020a0a04
)
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 c9dfea03ccd6dcb142ece673da609e9aed1d7ae7..927bda36f26b2c3f420c8afbbc83ac28bc147b27 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');
}
});