mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
publish_always option. https://github.com/proddy/EMS-ESP/issues/224
This commit is contained in:
@@ -9,6 +9,7 @@ var custom_config = {
|
||||
"shower_timer": false,
|
||||
"shower_alert": false,
|
||||
"publish_time": 120,
|
||||
"publish_always": false,
|
||||
"tx_mode": 1
|
||||
}
|
||||
};
|
||||
@@ -23,18 +24,26 @@ function listcustom() {
|
||||
if (custom_config.settings.led) {
|
||||
$("input[name=\"led\"][value=\"1\"]").prop("checked", true);
|
||||
}
|
||||
|
||||
if (custom_config.settings.dallas_parasite) {
|
||||
$("input[name=\"dallas_parasite\"][value=\"1\"]").prop("checked", true);
|
||||
}
|
||||
|
||||
if (custom_config.settings.listen_mode) {
|
||||
$("input[name=\"listen_mode\"][value=\"1\"]").prop("checked", true);
|
||||
}
|
||||
|
||||
if (custom_config.settings.shower_timer) {
|
||||
$("input[name=\"shower_timer\"][value=\"1\"]").prop("checked", true);
|
||||
}
|
||||
|
||||
if (custom_config.settings.shower_alert) {
|
||||
$("input[name=\"shower_alert\"][value=\"1\"]").prop("checked", true);
|
||||
}
|
||||
|
||||
if (custom_config.settings.publish_always) {
|
||||
$("input[name=\"publish_always\"][value=\"1\"]").prop("checked", true);
|
||||
}
|
||||
}
|
||||
|
||||
function savecustom() {
|
||||
@@ -66,6 +75,11 @@ function savecustom() {
|
||||
custom_config.settings.led = true;
|
||||
}
|
||||
|
||||
custom_config.settings.publish_always = false;
|
||||
if (parseInt($("input[name=\"publish_always\"]:checked").val()) === 1) {
|
||||
custom_config.settings.publish_always = true;
|
||||
}
|
||||
|
||||
custom_config.settings.publish_time = parseInt(document.getElementById("publish_time").value);
|
||||
custom_config.settings.tx_mode = parseInt(document.getElementById("tx_mode").value);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user