aboutsummaryrefslogtreecommitdiff
path: root/static/vevent.ts
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2021-11-30 01:09:53 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2021-11-30 01:09:53 +0100
commite71f0c20adc4dc2f49bca99a859241fdadf376d3 (patch)
tree3231d1e491fcd1ed9dc0ab31cac4fdedb733807d /static/vevent.ts
parentChange UID resolve. (diff)
downloadcalp-e71f0c20adc4dc2f49bca99a859241fdadf376d3.tar.gz
calp-e71f0c20adc4dc2f49bca99a859241fdadf376d3.tar.xz
Rework tab system.
This sepparates popup-elements from their tabbed contents, allowing clearer sepparations of concerns, along with easier adding and removing of tabs to the tabset!
Diffstat (limited to 'static/vevent.ts')
-rw-r--r--static/vevent.ts12
1 files changed, 11 insertions, 1 deletions
diff --git a/static/vevent.ts b/static/vevent.ts
index e35c469f..4b6d44c6 100644
--- a/static/vevent.ts
+++ b/static/vevent.ts
@@ -3,7 +3,8 @@ import { parseDate } from './lib'
export {
VEvent, xml_to_vcal,
- RecurrenceRule
+ RecurrenceRule,
+ isRedrawable,
}
/* Something which can be redrawn */
@@ -11,6 +12,11 @@ interface Redrawable extends HTMLElement {
redraw: ((data: VEvent) => void)
}
+function isRedrawable(x: HTMLElement): x is Redrawable {
+ return 'redraw' in x
+}
+
+
class VEventValue {
type: ical_type
@@ -209,6 +215,10 @@ class VEvent {
this.registered.push(htmlNode);
}
+ unregister(htmlNode: Redrawable) {
+ this.registered = this.registered.filter(node => node !== htmlNode)
+ }
+
to_jcal(): JCal {
let out_properties: JCalProperty[] = []
console.log(this.properties);