From 64e19c892f5cec7d96704932ef52cb77e9cf49a4 Mon Sep 17 00:00:00 2001 From: Bogdan Pilyugin Date: Tue, 11 Apr 2023 16:08:25 +0200 Subject: [PATCH] added space for the cron extended editor --- HTML/application.html | 75 ++--------------------------------------- HTML/espfs.paths | 1 + HTML/res/cron.js | 78 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 81 insertions(+), 73 deletions(-) create mode 100644 HTML/res/cron.js diff --git a/HTML/application.html b/HTML/application.html index 234e429..1e8203c 100644 --- a/HTML/application.html +++ b/HTML/application.html @@ -7,78 +7,10 @@ + ~name~ -
@@ -88,14 +20,11 @@
TIMER
-
- -
@@ -103,7 +32,7 @@
diff --git a/HTML/espfs.paths b/HTML/espfs.paths index 02a3000..0976c73 100644 --- a/HTML/espfs.paths +++ b/HTML/espfs.paths @@ -19,6 +19,7 @@ reboot.html res res/appstyles.css res/ca_cert.pem +res/cron.js res/iconsfont.css res/iconsfont.woff2 res/logo.png diff --git a/HTML/res/cron.js b/HTML/res/cron.js new file mode 100644 index 0000000..1e1abcc --- /dev/null +++ b/HTML/res/cron.js @@ -0,0 +1,78 @@ +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 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 +=("

Here extebnded cron editor

"); + 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 +=("
"); + content +=(""); + content +=("
"); + + content +=("
"); + //content +=(""); + content +=(""); + content +=("
") + + content +=("
"); + + content +=(""); + content +=(""); + + content +=(""); + + + content +=(""); + content +=(""); + + content +=("
"); + target.innerHTML = content; + } + } + function applytm() + { + + } + function addtm() + { + var num = timarr_test.length + 1; + timarr_test.push({'num':num,'start':1500000000,'cron':'* * * * * *'}); + drawtimers(timarr_test); + } \ No newline at end of file