diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-04-06 01:09:31 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-05-18 00:21:42 +0200 |
commit | feebf252b4a51467863ccba5d25b180548f79ef2 (patch) | |
tree | e91f6c66db75d4894d2c053a5d84d517716aff65 /static/components/vevent-edit.ts | |
parent | Possibly marginally improve tests. (diff) | |
download | calp-uid-stuff.tar.gz calp-uid-stuff.tar.xz |
workuid-stuff
Diffstat (limited to 'static/components/vevent-edit.ts')
-rw-r--r-- | static/components/vevent-edit.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/static/components/vevent-edit.ts b/static/components/vevent-edit.ts index ee368296..22e6409a 100644 --- a/static/components/vevent-edit.ts +++ b/static/components/vevent-edit.ts @@ -118,9 +118,16 @@ class ComponentEdit extends ComponentVEvent { } let submit = this.querySelector('form') as HTMLFormElement + /* TODO If start or end DATE is changed, only allow THIS */ + /* if only time component was changed, allow all */ submit.addEventListener('submit', (e) => { console.log(submit, e); - create_event(vcal_objects.get(this.uid)!); + // submit button pressed (e.submitter); + let submit_type = 'all'; + if (e.submitter) { + submit_type = e.submitter.dataset.key!; + } + create_event(submit_type, vcal_objects.get(this.uid)!); e.preventDefault(); return false; |