diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-11-20 22:08:42 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-11-20 22:08:42 +0100 |
commit | 8050c155c6a35ecd087cd438b26c656be59a80b2 (patch) | |
tree | 93c0e6c5b9249ae62840409971e6b8f9c0ab6cc8 | |
parent | Start adding binding stuff too rrule edit form. (diff) | |
download | calp-8050c155c6a35ecd087cd438b26c656be59a80b2.tar.gz calp-8050c155c6a35ecd087cd438b26c656be59a80b2.tar.xz |
Start binding in js.
Diffstat (limited to '')
-rw-r--r-- | static/script.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/static/script.js b/static/script.js index 60011cd8..ec209353 100644 --- a/static/script.js +++ b/static/script.js @@ -807,6 +807,31 @@ function bind_properties (el, wide_event=false) { get_property(el, e.dataset.property).push([e, f]); } + get_property(el, 'rrule'); + /* aside for rrule */ + for (let e of el.querySelectorAll('.recur-components .bind-rr')) { + + // e.name + + switch (e.tagName) { + case 'input': + e.value; + break; + case 'select': + e.options[e.selectedIndex].value; + break; + default: + if (e.classList.contains("date-time")) { + let date = e.querySelector('input[type=date]'); + let time = e.querySelector('input[type=time]'); + } else if (e.classList.contains("input-list")) { + e.get_value() + } else { + error(); + } + } + } + /* primary display tab */ for (let e of popup.querySelectorAll(".summary-tab .bind")) { |