diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-11-10 00:15:28 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-11-10 00:15:28 +0100 |
commit | ca99de5d4a913a5dada84c22b8b3eaf7d3740e8b (patch) | |
tree | 387cdcc11b644329393e4ac28b3e7de3757502a1 /static/vevent.ts | |
parent | Calendar colors now handled through html datasets. (diff) | |
download | calp-ca99de5d4a913a5dada84c22b8b3eaf7d3740e8b.tar.gz calp-ca99de5d4a913a5dada84c22b8b3eaf7d3740e8b.tar.xz |
Handle calendar change through dropdown.
Diffstat (limited to '')
-rw-r--r-- | static/vevent.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/static/vevent.ts b/static/vevent.ts index e0424ad7..c9068106 100644 --- a/static/vevent.ts +++ b/static/vevent.ts @@ -80,6 +80,8 @@ class VEvent { */ registered: Redrawable[] + _calendar: string | null = null; + constructor(properties: Map<string, VEventValue> = new Map(), components: VEvent[] = []) { this.components = components; this.registered = []; @@ -127,6 +129,13 @@ class VEvent { } } + setCalendar(calendar: string) { + this._calendar = calendar; + for (let el of this.registered) { + el.redraw(this); + } + } + register(htmlNode: Redrawable) { this.registered.push(htmlNode); } |