|
|
@@ -1136,9 +1136,20 @@ function _get_system_config() {
|
|
|
|
|
|
g_ctx.config.last_update = Date.now();
|
|
|
|
|
|
- if ("brightness" in m) { g_ctx.config.brightness = m["brightness"]; }
|
|
|
- if ("volume" in m) { g_ctx.config.volume = m["volume"]; }
|
|
|
- if ("showdimclock" in m) { g_ctx.config.showdimclock = m["showdimclock"]; }
|
|
|
+ if ("brightness" in m) { g_ctx.config.brightness = parseInt(m["brightness"]); }
|
|
|
+ if ("volume" in m) { g_ctx.config.volume = parseInt(m["volume"]); }
|
|
|
+ if ("showdimclock" in m) { g_ctx.config.showdimclock = parseInt(m["showdimclock"]); }
|
|
|
+
|
|
|
+ var ele;
|
|
|
+
|
|
|
+ ele = $("#ui_configuration_volume");
|
|
|
+ if (ele) { ele.val(g_ctx.config.volume/100.0); }
|
|
|
+
|
|
|
+ ele = $("#ui_configuration_brightness");
|
|
|
+ if (ele) { ele.val(g_ctx.config.brightness/100.0); }
|
|
|
+
|
|
|
+ ele = document.getElementById("ui_configuration_showclockondim");
|
|
|
+ if (ele) { ele.innerHTML = ((g_ctx.config.showdimclock == 1) ? "X" : "" ); }
|
|
|
|
|
|
_process_volume(g_ctx.config.volume/100.0);
|
|
|
_process_brightness(g_ctx.config.brightness/100.0);
|