From 8050c155c6a35ecd087cd438b26c656be59a80b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Fri, 20 Nov 2020 22:08:42 +0100 Subject: Start binding in js. --- static/script.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'static/script.js') 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")) { -- cgit v1.2.3