diff options
Diffstat (limited to 'modules/luci-base/htdocs/luci-static/resources/cbi.js')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/cbi.js | 9 |
1 files changed, 9 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 8bf94a6c50..fcf87adcb6 100644 --- a/modules/luci-base/htdocs/luci-static/resources/cbi.js +++ b/modules/luci-base/htdocs/luci-static/resources/cbi.js @@ -515,6 +515,15 @@ function cbi_init() { } } + nodes = document.querySelectorAll('[data-change]'); + + for (var i = 0, node; (node = nodes[i]) !== undefined; i++) { + var events = node.getAttribute('data-change').split(' '); + for (var j = 0, event; (event = events[j]) !== undefined; j++) { + cbi_bind(node, event, cbi_d_update); + } + } + cbi_d_update(); } |