From 7949fcdc683d07689bad5da5d20bfa3eeb5a6a46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 5 Sep 2023 01:25:00 +0200 Subject: Move frontend code to subdirectories, to simplify command line flags. --- static/components/vevent-description.ts | 38 --------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 static/components/vevent-description.ts (limited to 'static/components/vevent-description.ts') diff --git a/static/components/vevent-description.ts b/static/components/vevent-description.ts deleted file mode 100644 index b44185e7..00000000 --- a/static/components/vevent-description.ts +++ /dev/null @@ -1,38 +0,0 @@ -export { ComponentDescription } - -import { VEvent } from '../vevent' -import { ComponentVEvent } from './vevent' -import { format } from '../formatters' - -/* - -*/ -class ComponentDescription extends ComponentVEvent { - - constructor(uid?: string) { - super(uid); - if (!this.template) { - throw 'vevent-description template required'; - } - } - - redraw(data: VEvent) { - // update ourselves from template - - let body = (this.template!.content.cloneNode(true) as DocumentFragment).firstElementChild!; - - for (let el of body.querySelectorAll('[data-property]')) { - if (!(el instanceof HTMLElement)) continue; - format(el, data, el.dataset.property!); - } - - let repeating = body.getElementsByClassName('repeating')[0] as HTMLElement - if (data.getProperty('rrule')) { - repeating.classList.remove('hidden'); - } else { - repeating.classList.add('hidden'); - } - - this.replaceChildren(body); - } -} -- cgit v1.2.3