1
0
mirror of https://github.com/s00500/ESPUI.git synced 2025-07-04 06:10:18 +00:00

Dynamic visibility support

The ability to make controls visible and invisible
was basically already supported, we just need to add
some minor handling in controls.js.
This commit is contained in:
Ian Gray
2022-01-28 20:31:25 +00:00
parent d9a4854855
commit 576890e033
6 changed files with 36 additions and 1 deletions

7
data/js/controls.js vendored
View File

@ -575,6 +575,13 @@ function start() {
$("#id" + data.id).attr("style", data.panelStyle);
}
if(data.hasOwnProperty('visible')) {
if(data['visible'])
$("#id" + data.id).show();
else
$("#id" + data.id).hide();
}
if (data.type == UPDATE_SLIDER) {
element.removeClass(
"slider-turquoise slider-emerald slider-peterriver slider-wetasphalt slider-sunflower slider-carrot slider-alizarin"