From 5a29b84a1cba05b65980d7ebf105d0f75e4ee82b Mon Sep 17 00:00:00 2001 From: Christian Herzog Date: Sat, 5 Oct 2019 12:51:11 +0200 Subject: [PATCH] fix broken autoexec toggle --- components/wifi-manager/code.js | 3 ++- components/wifi-manager/index.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/wifi-manager/code.js b/components/wifi-manager/code.js index 07398c72..3b5c8ecb 100644 --- a/components/wifi-manager/code.js +++ b/components/wifi-manager/code.js @@ -175,10 +175,10 @@ $(document).ready(function(){ }); $("input#autoexec-cb").on("click", function() { - showMessage('please wait for the ESP32 to reboot', 'WARNING'); var data = { 'timestamp': Date.now() }; autoexec = (this.checked)?1:0; data['autoexec'] = autoexec; + showMessage('please wait for the ESP32 to reboot', 'WARNING'); $.ajax({ url: '/config.json', dataType: 'json', @@ -665,6 +665,7 @@ function getConfig() { $.getJSON("/config.json", function(data) { for (var key in data) { if (data.hasOwnProperty(key)) { + console.log(key+": "+data[key]); if (key == 'autoexec') { if (data["autoexec"] === "1") { $("#autoexec-cb")[0].checked=true; diff --git a/components/wifi-manager/index.html b/components/wifi-manager/index.html index a6c5d4ab..a8aefd6a 100644 --- a/components/wifi-manager/index.html +++ b/components/wifi-manager/index.html @@ -202,8 +202,8 @@

Start Squeezelite (toggle to activate changes)

- +