objects_test = ["scene_1", "scene_2", "scene_3", "scene_4", "scene_5", "scene_6", "scene_7", "scene_8", "scene_9", "scene_10", "scene_11", "scene_12", "scene_13", "scene_14", "scene_15", "scene_16"]; actions_test = ["start", "stop"]; timarr_test = [{ 'num': 1, 'obj': 2, 'act': 0, 'start': 1000000000, 'cron': '*/2 * * * * *' }, { 'num': 2, 'obj': 12, 'act': 1, 'start': 1622222222, 'cron': '6 0 12 * * *' }, { 'num': 3, 'obj': 8, 'act': 0, 'start': 1675757575, 'cron': '* * * * * *' }]; function savetm(n) { } function set_cron_string(tnum, s, m, h, d, mm, w) { var c = (document.getElementById("cron" + tnum).value).split(" "); if (c.length == 6) { if (s != null) c[0] = s; if (m != null) c[1] = m; if (h != null) c[2] = h; if (d != null) c[3] = d; if (mm != null) c[4] = mm; if (w != null) c[5] = w; document.getElementById("cron" + tnum).value = c[0] + " " + c[1] + " " + c[2] + " " + c[3] + " " + c[4] + " " + c[5]; } } function getSecondSelect(n) { var s = document.getElementById("seconds").value; set_cron_string(n, s, null, null, null, null, null); } function getMinutesSelect(n) { var m = document.getElementById("minutes").value; set_cron_string(n, null, m, null, null, null, null); } function getHoursSelect(n) { var h = document.getElementById("hours").value; set_cron_string(n, null, null, h, null, null, null); } function deltm(n) { alert("Delete timer " + n); timarr_test.splice(n - 1, 1); drawtimers(timarr_test); } function closecron(n) { var target = document.getElementById("cronext"+n); var content = ""; target.innerHTML = content; } function setcron(n) { var target = document.getElementById("cronext" + n); var content = ""; content += ("
"); content += (""); content += (""); content += (""); content += (""); content += (""); target.innerHTML = content; } function drawtimers(tarr) { var num = tarr.length; var target = document.getElementById("timer"); var content = ""; for (i = 1; i <= num; i++) { content += ("