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:
5258080
)
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:43:28 +0000
(08:43 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
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 2dba54750d230300b600f1c7f5be2ebdec4328c7..92c41515fb3d166a75600b9043ef4f325c1301c9 100644
(file)
--- a/
modules/luci-base/htdocs/luci-static/resources/cbi.js
+++ b/
modules/luci-base/htdocs/luci-static/resources/cbi.js
@@
-731,6
+731,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);
}