aboutsummaryrefslogtreecommitdiff
path: root/static/vevent.ts
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2021-11-10 00:15:28 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2021-11-10 00:15:28 +0100
commitca99de5d4a913a5dada84c22b8b3eaf7d3740e8b (patch)
tree387cdcc11b644329393e4ac28b3e7de3757502a1 /static/vevent.ts
parentCalendar colors now handled through html datasets. (diff)
downloadcalp-ca99de5d4a913a5dada84c22b8b3eaf7d3740e8b.tar.gz
calp-ca99de5d4a913a5dada84c22b8b3eaf7d3740e8b.tar.xz
Handle calendar change through dropdown.
Diffstat (limited to 'static/vevent.ts')
-rw-r--r--static/vevent.ts9
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);
}