diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-11-26 15:32:41 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-11-26 15:32:41 +0100 |
commit | 1df15b2ceaef09b48a39aa6046b577da11ea2f72 (patch) | |
tree | cf8dd5340703961c53daae1b2e7d0535d785f6d4 /static/components/vevent-edit.ts | |
parent | Slightly better error hnadling in directory-table. (diff) | |
download | calp-1df15b2ceaef09b48a39aa6046b577da11ea2f72.tar.gz calp-1df15b2ceaef09b48a39aa6046b577da11ea2f72.tar.xz |
Got categories working.
Diffstat (limited to 'static/components/vevent-edit.ts')
-rw-r--r-- | static/components/vevent-edit.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/static/components/vevent-edit.ts b/static/components/vevent-edit.ts index 4408cbb8..b9b733a0 100644 --- a/static/components/vevent-edit.ts +++ b/static/components/vevent-edit.ts @@ -1,9 +1,10 @@ export { ComponentEdit } import { ComponentVEvent } from './vevent' +import { InputList } from './input-list' import { DateTimeInput } from './date-time-input' -import { vcal_objects, event_calendar_mapping } from '../globals' +import { vcal_objects } from '../globals' import { VEvent } from '../vevent' import { create_event } from '../server_connect' @@ -55,18 +56,21 @@ class ComponentEdit extends ComponentVEvent { // for (let el of this.getElementsByClassName("interactive")) { for (let el of this.querySelectorAll("[data-property]")) { // console.log(el); - el.addEventListener('input', () => { + el.addEventListener('input', (e) => { let obj = vcal_objects.get(this.uid) + console.log(el, e); if (obj === undefined) { throw 'No object with uid ' + this.uid } if (!(el instanceof HTMLInputElement || el instanceof DateTimeInput || el instanceof HTMLTextAreaElement + || el instanceof InputList )) { console.log(el, 'not an HTMLInputElement'); return; } + // console.log(`obj[${el.dataset.property!}] = `, el.value); obj.setProperty( el.dataset.property!, el.value) |