aboutsummaryrefslogtreecommitdiff
path: root/static/components/vevent-edit.ts
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2021-12-09 19:17:46 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2021-12-09 19:17:46 +0100
commit15e50471776e702333920b188932f03ee1f8573b (patch)
tree6129332e6591cbe685f999550b6891c717126401 /static/components/vevent-edit.ts
parentCSS to prevent event blocks from overflowing. (diff)
downloadcalp-15e50471776e702333920b188932f03ee1f8573b.tar.gz
calp-15e50471776e702333920b188932f03ee1f8573b.tar.xz
Propagate recurring events to frontend.
This handles each instance of a recurring event as its own unique event, which allows us to properly send it to the frontend. It's currently not possible to submit the repeating events back, but that is probably a underlying problem.
Diffstat (limited to 'static/components/vevent-edit.ts')
-rw-r--r--static/components/vevent-edit.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/static/components/vevent-edit.ts b/static/components/vevent-edit.ts
index d48c7967..5c482882 100644
--- a/static/components/vevent-edit.ts
+++ b/static/components/vevent-edit.ts
@@ -7,6 +7,7 @@ import { DateTimeInput } from './date-time-input'
import { vcal_objects } from '../globals'
import { VEvent, RecurrenceRule } from '../vevent'
import { create_event } from '../server_connect'
+import { to_boolean } from '../lib'
/* <vevent-edit />
Edit form for a given VEvent. Used as the edit tab of popups.
@@ -148,6 +149,11 @@ class ComponentEdit extends ComponentVEvent {
}
}
+ let el = this.querySelector('[name="has_repeats"]')
+ if (el) {
+ (el as HTMLInputElement).checked = to_boolean(data.getProperty('rrule'))
+ }
+
if (data.calendar) {
for (let el of this.getElementsByClassName('calendar-selection')) {
(el as HTMLSelectElement).value = data.calendar;