diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-06-23 01:39:08 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-06-23 01:39:08 +0200 |
commit | 327b322b9583f760cd02ddad7a2a8890df26cc8b (patch) | |
tree | d0a73d5df0011233f3eaa5d9a54d1317fad50bbc /static/components/tab-group-element.ts | |
parent | Minor cleanup in recurrence generate. (diff) | |
download | calp-uid-stuff-2.tar.gz calp-uid-stuff-2.tar.xz |
workuid-stuff-2
Diffstat (limited to 'static/components/tab-group-element.ts')
-rw-r--r-- | static/components/tab-group-element.ts | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/static/components/tab-group-element.ts b/static/components/tab-group-element.ts index e90997e9..11949870 100644 --- a/static/components/tab-group-element.ts +++ b/static/components/tab-group-element.ts @@ -26,8 +26,8 @@ class TabGroupElement extends ComponentVEvent { tabs: HTMLElement[] = []; tabLabels: HTMLElement[] = []; - constructor(uid?: string) { - super(uid); + constructor(uid?: string, instance?: string) { + super(uid!, instance!); this.menu = makeElement('div', {}, { role: 'tablist', @@ -43,7 +43,8 @@ class TabGroupElement extends ComponentVEvent { if (!this.has_rrule_tab()) { /* Note that EditRRule register itself to be updated on changes to the event */ - this.addTab(new EditRRule(data.getProperty('uid')), + this.addTab(new EditRRule(data.getProperty('uid'), + data.getProperty('dtstart')?.format('~Y-~m-~dT~H:~M:~S')), "↺", "Upprepningar"); } } else { @@ -71,7 +72,7 @@ class TabGroupElement extends ComponentVEvent { } /* redraw might add or remove tabs depending on our data, so call it here */ - this.redraw(vcal_objects.get(this.uid)!); + this.redraw(this.getData()!); /* All tabs should now be ready, focus the first one */ if (this.tabLabels.length > 0) { @@ -144,7 +145,7 @@ class TabGroupElement extends ComponentVEvent { if (tab.firstChild) { let child = tab.firstChild as HTMLElement; if (isRedrawable(child)) { - vcal_objects.get(this.uid)?.unregister(child) + this.getData()?.unregister(child) } } |