aboutsummaryrefslogtreecommitdiff
path: root/static/components/vevent-edit.ts
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-04-06 01:09:31 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-05-18 00:21:42 +0200
commitfeebf252b4a51467863ccba5d25b180548f79ef2 (patch)
treee91f6c66db75d4894d2c053a5d84d517716aff65 /static/components/vevent-edit.ts
parentPossibly marginally improve tests. (diff)
downloadcalp-feebf252b4a51467863ccba5d25b180548f79ef2.tar.gz
calp-feebf252b4a51467863ccba5d25b180548f79ef2.tar.xz
Diffstat (limited to 'static/components/vevent-edit.ts')
-rw-r--r--static/components/vevent-edit.ts9
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;