From dfd5cea53dfff12fb08abea047af72cbb39eb22b Mon Sep 17 00:00:00 2001 From: Magnus Persson Date: Thu, 28 Apr 2022 20:14:16 +0200 Subject: [PATCH] Disable adv config by default --- html/config.htm | 51 ++++++++++++++++++++++++++++++++++++--------- html/config.min.htm | 2 +- 2 files changed, 42 insertions(+), 11 deletions(-) diff --git a/html/config.htm b/html/config.htm index e81a462..14ed0cc 100644 --- a/html/config.htm +++ b/html/config.htm @@ -465,7 +465,7 @@
- +
(10-100) - default 50
@@ -473,7 +473,7 @@
- +
(50-1000) - default 500
@@ -481,7 +481,7 @@
- +
(1 - 10) - default 1.6 SG
@@ -491,7 +491,7 @@
- +
(1 - 60) - default 20 s
@@ -499,7 +499,7 @@
- +
(10 - 240) - default 120 s
@@ -509,7 +509,7 @@
- +
(0 - 5) - default 0
@@ -517,7 +517,7 @@
- +
(0 - 5) - default 0
@@ -525,7 +525,7 @@
- +
(0 - 5) - default 0
@@ -533,7 +533,7 @@
- +
(0 - 5) - default 0
@@ -541,7 +541,7 @@
- +
(0 - 5) - default 0
@@ -553,6 +553,15 @@ +
+
+
+ + +
+
+
+ @@ -718,6 +727,28 @@ $("#format-btn2").prop("disabled", b); $("#test-btn2").prop("disabled", b); $("#advanced-btn").prop("disabled", b); + + checkAdvancedSection( b ); + } + + $("#adv-config").click(function(e){ + checkAdvancedSection(); + }); + + function checkAdvancedSection( b ) { + var b = $("#adv-config").is(":checked"); + + $("#advanced-btn").prop("disabled", b); + $("#gyro-read-count").prop("disabled", b); + $("#gyro-moving-threashold").prop("disabled", b); + $("#formula-max-deviation").prop("disabled", b); + $("#wifi-portal-timeout").prop("disabled", b); + $("#wifi-connect-timeout").prop("disabled", b); + $("#int-http1").prop("disabled", b); + $("#int-http2").prop("disabled", b); + $("#int-http3").prop("disabled", b); + $("#int-influx").prop("disabled", b); + $("#int-mqtt").prop("disabled", b); } // Get the advanced values from the API diff --git a/html/config.min.htm b/html/config.min.htm index 82a3e60..7af949c 100644 --- a/html/config.min.htm +++ b/html/config.min.htm @@ -1 +1 @@ -Beer Gravity Monitor

Temperature Format:


Gravity Format:

(10-100) - default 50
(50-1000) - default 500
(1 - 10) - default 1.6 SG

(1 - 60) - default 20 s
(10 - 240) - default 120 s

(0 - 5) - default 0
(0 - 5) - default 0
(0 - 5) - default 0
(0 - 5) - default 0
(0 - 5) - default 0
(C) Copyright 2021-22 Magnus Persson
\ No newline at end of file +Beer Gravity Monitor

Temperature Format:


Gravity Format:

(10-100) - default 50
(50-1000) - default 500
(1 - 10) - default 1.6 SG

(1 - 60) - default 20 s
(10 - 240) - default 120 s

(0 - 5) - default 0
(0 - 5) - default 0
(0 - 5) - default 0
(0 - 5) - default 0
(0 - 5) - default 0
(C) Copyright 2021-22 Magnus Persson
\ No newline at end of file