From ec9f95e5929ad7fd86909002b851e3fa71d2a46b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 15 Nov 2021 01:32:29 +0100 Subject: Fix calendar for popup. --- static/components/popup-element.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'static/components') diff --git a/static/components/popup-element.ts b/static/components/popup-element.ts index bad7476a..2f019f4d 100644 --- a/static/components/popup-element.ts +++ b/static/components/popup-element.ts @@ -4,6 +4,7 @@ import { gensym } from '../lib' import { VEvent } from '../vevent' import { bind_popup_control } from '../dragable' import { close_popup, event_from_popup } from '../popup' +import { vcal_objects } from '../globals' import { ComponentVEvent } from './vevent' import { TabElement } from './tab-element' @@ -23,12 +24,14 @@ class PopupElement extends ComponentVEvent { this.tabgroup_id = gensym(); this.tabcount = 0 + + let obj = vcal_objects.get(this.uid); + if (obj && obj.calendar) { + this.dataset.calendar = obj.calendar; + } } redraw(data: VEvent) { - // console.warn('IMPLEMENT ME'); - - console.log('popup', data.calendar); if (data.calendar) { this.dataset.calendar = data.calendar; } -- cgit v1.2.3