0 || numReload > 0 || numReconnect > 0)){
- conf_saved = true;
+ if (value == 8) {
+ configurationSaved = true;
}
window.alert(messages[value]);
return;
@@ -1861,6 +1979,7 @@ function processData(data) {
// ---------------------------------------------------------------------
// Matching
// ---------------------------------------------------------------------
+ var elems = [];
var pre;
var post;
@@ -1877,6 +1996,7 @@ function processData(data) {
post = input.attr("post") || "";
input.val(pre + value + post);
}
+ elems.push(input);
}
// Look for SPANs
@@ -1886,11 +2006,13 @@ function processData(data) {
value.forEach(function(elem) {
span.append(elem);
span.append('');
+ elems.push(span);
});
} else {
pre = span.attr("pre") || "";
post = span.attr("post") || "";
span.html(pre + value + post);
+ elems.push(span);
}
}
@@ -1898,11 +2020,12 @@ function processData(data) {
var select = $("select[name='" + key + "']");
if (select.length > 0) {
select.val(value);
+ elems.push(select);
}
- });
+ setOriginalsFromValues($(elems));
- setOriginalsFromValues();
+ });
}
@@ -1928,16 +2051,16 @@ function hasChanged() {
if ("reconnect" === action) { ++numReconnect; }
if ("reboot" === action) { ++numReboot; }
if ("reload" === action) { ++numReload; }
- $(this).attr("hasChanged", true);
}
+ $(this).attr("hasChanged", true);
} else {
if (hasChanged) {
--numChanged;
if ("reconnect" === action) { --numReconnect; }
if ("reboot" === action) { --numReboot; }
if ("reload" === action) { --numReload; }
- $(this).attr("hasChanged", false);
}
+ $(this).attr("hasChanged", false);
}
}
@@ -2050,9 +2173,14 @@ $(function() {
$(".button-add-network").on("click", function() {
$(".more", addNetwork()).toggle();
});
- $(".button-add-switch-schedule").on("click", { schType: 1 }, addSchedule);
+
+ $(".button-add-switch-schedule").on("click", function() {
+ addSchedule({schType: 1, schSwitch: -1});
+ });
- $(".button-add-light-schedule").on("click", { schType: 2 }, addSchedule);
+ $(".button-add-light-schedule").on("click", function() {
+ addSchedule({schType: 2, schSwitch: -1});
+ });
$(".button-add-rpnrule").on('click', addRPNRule);
@@ -2083,8 +2211,16 @@ $(function() {
$("textarea").on("dblclick", function() { this.select(); });
+ resetOriginals();
+
+ $(".group-settings").each(function() {
+ groupSettingsObserver.observe(this, {childList: true});
+ });
+
// don't autoconnect when opening from filesystem
- if (window.location.protocol === "file:") { return; }
+ if (window.location.protocol === "file:") {
+ return;
+ }
// Check host param in query string
var search = new URLSearchParams(window.location.search),
diff --git a/code/html/index.html b/code/html/index.html
index 2cdcfbd7..837dc33e 100644
--- a/code/html/index.html
+++ b/code/html/index.html
@@ -42,13 +42,13 @@
@@ -589,10 +589,10 @@
-
+
-
+
@@ -753,7 +753,7 @@
-
+
@@ -774,7 +774,7 @@
-
+
-
+
@@ -1348,10 +1348,10 @@
Enter the field number to send each data to, 0 disable notifications from that component.
-
+
-
+
@@ -1446,7 +1446,7 @@
-
+
@@ -1456,7 +1456,7 @@
Variable Name
-
+
@@ -1840,12 +1840,12 @@
Set when using a static IP
-
+
Usually 255.255.255.0 for /24 networks
-
+
Set the Domain Name Server IP to use when using a static IP
@@ -1862,7 +1862,7 @@
@@ -1879,7 +1879,7 @@
-
1 for Monday, 2 for Tuesday...
+
1 for Monday, 2 for Tuesday etc., comma separated
@@ -1895,13 +1895,13 @@
-
-
+
@@ -1911,7 +1911,7 @@
-
+
@@ -1950,7 +1950,7 @@