luci-base: cbi.js: await L.ui load before updating tables
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>
This commit is contained in:
parent
d88a0c8989
commit
bdfdd95a27
1 changed files with 3 additions and 1 deletions
|
@ -796,5 +796,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
L.hideTooltip(ev);
|
L.hideTooltip(ev);
|
||||||
});
|
});
|
||||||
|
|
||||||
document.querySelectorAll('.table').forEach(cbi_update_table);
|
L.require('ui').then(function(ui) {
|
||||||
|
document.querySelectorAll('.table').forEach(cbi_update_table);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue