aboutsummaryrefslogtreecommitdiff
path: root/static/components/vevent-description.ts
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-09-05 01:25:00 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-09-05 01:25:00 +0200
commit7949fcdc683d07689bad5da5d20bfa3eeb5a6a46 (patch)
treec1bc39dc0e508ee498cf7119f888f513db4bab8f /static/components/vevent-description.ts
parentAdd build step for jsdoc. (diff)
downloadcalp-7949fcdc683d07689bad5da5d20bfa3eeb5a6a46.tar.gz
calp-7949fcdc683d07689bad5da5d20bfa3eeb5a6a46.tar.xz
Move frontend code to subdirectories, to simplify command line flags.
Diffstat (limited to 'static/components/vevent-description.ts')
-rw-r--r--static/components/vevent-description.ts38
1 files changed, 0 insertions, 38 deletions
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'
-
-/*
- <vevent-description />
-*/
-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);
- }
-}