diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-11-15 00:47:13 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-11-15 00:47:13 +0100 |
commit | ecdb4b7eeb42dc859cfd6aa31634b423b72c50bd (patch) | |
tree | b910e8d3c6661f2b7e401ae18097f643d5cdd585 /static/script.ts | |
parent | Reword popup visible attribute. (diff) | |
download | calp-ecdb4b7eeb42dc859cfd6aa31634b423b72c50bd.tar.gz calp-ecdb4b7eeb42dc859cfd6aa31634b423b72c50bd.tar.xz |
Rework some drawing and how calendar is accessed.
Diffstat (limited to 'static/script.ts')
-rw-r--r-- | static/script.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/static/script.ts b/static/script.ts index 655d1e36..2a339e77 100644 --- a/static/script.ts +++ b/static/script.ts @@ -31,9 +31,12 @@ window.addEventListener('load', function() { let div2 = document.getElementById('calendar-event-mapping')!; for (let calendar of div2.children) { + let calendar_name = calendar.getAttribute('key')!; for (let child of calendar.children) { - event_calendar_mapping.set( - child.innerHTML, calendar.getAttribute('key')!); + let uid = child.innerHTML; + event_calendar_mapping.set(uid, calendar_name); + let obj = vcal_objects.get(uid); + if (obj) obj.calendar = calendar_name } } |