Browse Source

WebUI: Fix scheduler panel tabindex= values (#2096)

* added data-settings-max value to html

* fixed: use the value and not the defenition of the function

* the schedules variable already starts from 0 not need to increment

* another misuse of function as variable
mcspr-patch-1
foxman69 4 years ago
committed by Max Prokhorov
parent
commit
e3887da8a0
2 changed files with 5 additions and 5 deletions
  1. +4
    -4
      code/html/custom.js
  2. +1
    -1
      code/html/index.html

+ 4
- 4
code/html/custom.js View File

@ -1030,7 +1030,7 @@ function addNetwork(values) {
values = {};
}
var tabindex = 200 + numNetworks * 10;
var tabindex = 200 + number * 10;
var template = $("#networkTemplate").children();
var line = $(template).clone();
$(line).find("input").each(function() {
@ -1086,7 +1086,7 @@ function addSchedule(values) {
values = {};
}
var tabindex = 200 + numSchedules * 10;
var tabindex = 200 + schedules * 10;
var template = $("#scheduleTemplate").children();
var line = $(template).clone();
@ -1102,10 +1102,10 @@ function addSchedule(values) {
$(line).find(".button-del-schedule").on("click", delSchedule);
$(line).find(".button-more-schedule").on("click", moreSchedule);
var schUTC_id = "schUTC" + (schedules + 1);
var schUTC_id = "schUTC" + schedules;
$(line).find("input[name='schUTC']").prop("id", schUTC_id).next().prop("for", schUTC_id);
var schEnabled_id = "schEnabled" + (schedules + 1);
var schEnabled_id = "schEnabled" + schedules;
$(line).find("input[name='schEnabled']").prop("id", schEnabled_id).next().prop("for", schEnabled_id);
$(line).find("input[type='checkbox']").prop("checked", false);


+ 1
- 1
code/html/index.html View File

@ -779,7 +779,7 @@
<fieldset>
<div id="schedules" class="group-settings" data-settings-target="schSwitch" ></div>
<div id="schedules" class="group-settings" data-settings-max="10" data-settings-target="schSwitch" ></div>
<button type="button" class="pure-button button-add-switch-schedule module module-relay">Add switch schedule</button>
<!-- removeIf(!light) -->


Loading…
Cancel
Save