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:
69445fa
)
luci-base: cbi.js: avoid double-initialization of dropdowns
author
Jo-Philipp Wich
<jo@mein.io>
Fri, 14 Feb 2020 07:43:28 +0000
(08:43 +0100)
committer
Jo-Philipp Wich
<jo@mein.io>
Fri, 14 Feb 2020 07:46:38 +0000
(08:46 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit
9ae1f478960f9587e8123e61e1a2221e866da26b
)
modules/luci-base/htdocs/luci-static/resources/cbi.js
patch
|
blob
|
history
diff --git
a/modules/luci-base/htdocs/luci-static/resources/cbi.js
b/modules/luci-base/htdocs/luci-static/resources/cbi.js
index ff198027e37df4dd7f72f7dec6fe881e62bf3752..f9b601995c541f940ef43bf0b5a383a64280190a 100644
(file)
--- a/
modules/luci-base/htdocs/luci-static/resources/cbi.js
+++ b/
modules/luci-base/htdocs/luci-static/resources/cbi.js
@@
-714,6
+714,9
@@
if (typeof(window.CustomEvent) !== 'function') {
}
function cbi_dropdown_init(sb) {
+ if (sb && L.dom.findClassInstance(sb) instanceof L.ui.Dropdown)
+ return;
+
var dl = new L.ui.Dropdown(sb, null, { name: sb.getAttribute('name') });
return dl.bind(sb);
}