From e3887da8a0e81178921c08a6e87eecdcb23f3597 Mon Sep 17 00:00:00 2001 From: foxman69 <52827101+foxman69@users.noreply.github.com> Date: Mon, 13 Jan 2020 13:33:28 +0200 Subject: [PATCH] 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 --- code/html/custom.js | 8 ++++---- code/html/index.html | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/html/custom.js b/code/html/custom.js index c5a1a37c..39d77bd0 100644 --- a/code/html/custom.js +++ b/code/html/custom.js @@ -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); diff --git a/code/html/index.html b/code/html/index.html index 0bdcdc7b..ef6197dc 100644 --- a/code/html/index.html +++ b/code/html/index.html @@ -779,7 +779,7 @@