web: init relay selectors inside relayConfig

This commit is contained in:
Maxim Prokhorov
2019-11-25 23:34:14 +03:00
parent 76e2542459
commit 812c3ea8a0
17 changed files with 9119 additions and 9119 deletions

View File

@@ -983,8 +983,7 @@ function addSchedule(event) {
var type = (1 === event.data.schType) ? "switch" : "light";
template = $("#" + type + "ActionTemplate").children();
var actionLine = template.clone();
$(line).find("#schActionDiv").append(actionLine);
$(line).find("#schActionDiv").append(template.clone());
$(line).find("input").each(function() {
$(this).attr("tabindex", tabindex);
@@ -1028,10 +1027,6 @@ function initRelays(data) {
$("label.toggle", line).prop("for", "relay" + i)
line.appendTo("#relays");
// Populate the relay SELECTs
$("select.isrelay").append(
$("<option></option>").attr("value",i).text("Switch #" + i));
}
}
@@ -1096,6 +1091,11 @@ function initRelayConfig(data) {
}
line.appendTo("#relayConfig");
// Populate the relay SELECTs
$("select.isrelay").append(
$("<option></option>").attr("value",i).text("Switch #" + i));
}
}