From e8216ceb2cb5c61ef6fd6d6f6c9151511d01d8e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 15 Nov 2021 01:39:46 +0100 Subject: Propagate default-calendar from backend to frontend. --- static/event-creator.ts | 2 +- static/globals.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'static') diff --git a/static/event-creator.ts b/static/event-creator.ts index 74ba4235..97ffbd62 100644 --- a/static/event-creator.ts +++ b/static/event-creator.ts @@ -67,7 +67,7 @@ class EventCreator { that.ev = new VEvent(); that.ev.setProperty('summary', 'Created Event'); that.ev.setProperty('uid', uuid()) - that.ev.calendar = btoa('Calendar'); + that.ev.calendar = window.default_calendar; // let ev_block = document.createElement('vevent-block') as ComponentBlock; let ev_block = new ComponentBlock(that.ev.getProperty('uid')); diff --git a/static/globals.ts b/static/globals.ts index 7ccfb3d2..6b689697 100644 --- a/static/globals.ts +++ b/static/globals.ts @@ -15,6 +15,7 @@ declare global { vcal_objects: Map; VIEW: 'month' | 'week'; EDIT_MODE: boolean; + default_calendar: string; } } window.vcal_objects = vcal_objects; -- cgit v1.2.3