diff --git a/code/html/custom.css b/code/html/custom.css index 87d920e0..b22b74c4 100644 --- a/code/html/custom.css +++ b/code/html/custom.css @@ -154,8 +154,6 @@ div.state { .button-update, .button-update-password, .button-add-network, -.button-add-switch-schedule, -.button-add-light-schedule, .button-rfb-learn, .button-upgrade-browse, .button-ha-add, @@ -165,6 +163,12 @@ div.state { background: rgb(0, 192, 0); /* green */ } +.button-add-switch-schedule, +.button-add-light-schedule { + background: rgb(0, 192, 0); /* green */ + display: none; +} + .button-more-network, .button-more-schedule, .button-wifi-scan, diff --git a/code/html/custom.js b/code/html/custom.js index c56cdaed..b10ade1d 100644 --- a/code/html/custom.js +++ b/code/html/custom.js @@ -619,14 +619,21 @@ function addSchedule(event) { return null; } var tabindex = 200 + numSchedules * 10; - var template = $("#" + event.data.schType + "ScheduleTemplate").children(); + var template = $("#scheduleTemplate").children(); var line = $(template).clone(); + + template = $("#" + event.data.schType + "ActionTemplate").children(); + var actionLine = template.clone(); + $(line).find("#schActionDiv").append(actionLine); + $(line).find("input").each(function() { $(this).attr("tabindex", tabindex); tabindex++; }); $(line).find(".button-del-schedule").on("click", delSchedule); $(line).find(".button-more-schedule").on("click", moreSchedule); + var ena = $(line).find(":checkbox"); + ena.prop("checked", false).iphoneStyle("refresh"); line.appendTo("#schedules"); return line; } @@ -1093,6 +1100,15 @@ function processData(data) { return; } + + if ("colorVisible" === key) { + $(".button-add-light-schedule").show(); + } + + if ("relayVisible" === key) { + $(".button-add-switch-schedule").show(); + } + // Enable options var position = key.indexOf("Visible"); if (position > 0 && position === key.length - 7) { diff --git a/code/html/index.html b/code/html/index.html index 1db4a715..bf858011 100644 --- a/code/html/index.html +++ b/code/html/index.html @@ -1082,7 +1082,7 @@ -
+
@@ -1102,64 +1102,38 @@
 1 for Monday, 2 for Tuesday...
- - -
- + +
- -
- +
- - +
-
-
- -
- - -
- -
 h
-
-
- -
 m
-
-
- - -
- -
-
 1 for Monday, 2 for Tuesday...
- - -
- -
- -
- - -
- -
- - +
+ +
+
+ + +
+
+ +
+ +
+ +