diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-11-20 23:02:48 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-11-20 23:02:48 +0100 |
commit | c7ed6ecc5cca8e9e3d4d97bda3d0f381345cdc2d (patch) | |
tree | e7f2b4fd6112f20d6b5e56bd60738717f102159e /static/script.js | |
parent | Work on templetazing js. (diff) | |
parent | Start binding in js. (diff) | |
download | calp-c7ed6ecc5cca8e9e3d4d97bda3d0f381345cdc2d.tar.gz calp-c7ed6ecc5cca8e9e3d4d97bda3d0f381345cdc2d.tar.xz |
Merge branch 'edit-rrule' into 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 74c90e27..ec956d5a 100644 --- a/static/script.js +++ b/static/script.js @@ -431,6 +431,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")) { |