summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-12-13 11:27:52 +0100
committerJo-Philipp Wich <jo@mein.io>2018-12-13 11:35:38 +0100
commit979a4780018778008bdf11c343671376021ecbf9 (patch)
tree7222e72e29f947efb34aa6020f887b4f080348f7 /modules
parent3094c5dbb84eb70de5d3141f5c441409b7607e86 (diff)
luci-base: cbi.js: update deps on dynlist changes, honor placeholder
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/cbi.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi.js b/modules/luci-base/htdocs/luci-static/resources/cbi.js
index 61b83e829..6feb9fb35 100644
--- a/modules/luci-base/htdocs/luci-static/resources/cbi.js
+++ b/modules/luci-base/htdocs/luci-static/resources/cbi.js
@@ -919,6 +919,8 @@ CBIDynamicList = {
else if (!hidden || hidden.value >= value)
exists = !!item.parentNode.insertBefore(new_item, item);
});
+
+ cbi_d_update();
},
removeItem: function(dl, item) {
@@ -933,6 +935,7 @@ CBIDynamicList = {
}
item.parentNode.removeChild(item);
+ cbi_d_update();
},
handleClick: function(ev) {
@@ -1018,6 +1021,7 @@ function cbi_dynlist_init(dl, datatype, optional, choices)
'type': 'text',
'name': 'cbi.dynlist.' + dl.getAttribute('data-prefix'),
'class': 'cbi-input-text',
+ 'placeholder': dl.getAttribute('data-placeholder'),
'data-type': datatype,
'data-optional': true
})));