projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d88a0c8
)
luci-base: cbi.js: await L.ui load before updating tables
author
Jo-Philipp Wich
<jo@mein.io>
Wed, 9 Nov 2022 19:26:14 +0000
(20:26 +0100)
committer
Jo-Philipp Wich
<jo@mein.io>
Wed, 9 Nov 2022 19:30:20 +0000
(20:30 +0100)
On legacy views, the `L.ui` JavaScript class is not automatically loaded,
so request it before updating tables.
Fixes: e0e6989a4a ("luci-base: introduce new LuCI.ui.Table class")
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 65ea6bce3cd85d18fd5d4fb8aba81e6aa9df49e7..3fc6edf29fad77395c8666ac55528614d2ab7edd 100644
(file)
--- a/
modules/luci-base/htdocs/luci-static/resources/cbi.js
+++ b/
modules/luci-base/htdocs/luci-static/resources/cbi.js
@@
-796,5
+796,7
@@
document.addEventListener('DOMContentLoaded', function() {
L.hideTooltip(ev);
});
- document.querySelectorAll('.table').forEach(cbi_update_table);
+ L.require('ui').then(function(ui) {
+ document.querySelectorAll('.table').forEach(cbi_update_table);
+ });
});