Fix fullcalendar v5 options for background events

`rendering` was used in v4, in v5 `display` changes the way how events
are rendered. This caused blocks in the UI that then made the free/busy
schedule grow vertically and so became less useful.

Ref https://fullcalendar.io/docs/upgrading-from-v4
Ref https://fullcalendar.io/docs/background-events

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2021-02-12 12:07:26 +01:00
parent 9ee8d4b59f
commit 568bdbd990
No known key found for this signature in database
GPG Key ID: CC42AC2A7F0E56D8
2 changed files with 8 additions and 8 deletions

View File

@ -41,7 +41,7 @@ export default function(uri, calendarData, success, start, end, timezone) {
start: start.getInTimezone(timezone).jsDate.toISOString(),
end: end.getInTimezone(timezone).jsDate.toISOString(),
resourceId: uri,
rendering: 'background',
display: 'background',
allDay: false,
backgroundColor: getColorForFBType('UNKNOWN'),
borderColor: getColorForFBType('UNKNOWN'),
@ -67,7 +67,7 @@ export default function(uri, calendarData, success, start, end, timezone) {
start: freeBusyProperty.getFirstValue().start.getInTimezone(timezone).jsDate.toISOString(),
end: freeBusyProperty.getFirstValue().end.getInTimezone(timezone).jsDate.toISOString(),
resourceId: uri,
rendering: 'background',
display: 'background',
backgroundColor: getColorForFBType(freeBusyProperty.type),
})
}

View File

@ -45,7 +45,7 @@ export default function(id, resources, eventStart, eventEnd) {
start: eventStart.toISOString(),
end: eventEnd.toISOString(),
allDay: false,
rendering: 'background',
display: 'background',
classNames: [
'blocking-event-free-busy',
'blocking-event-free-busy--first-row',
@ -59,7 +59,7 @@ export default function(id, resources, eventStart, eventEnd) {
start: eventStart.toISOString(),
end: eventEnd.toISOString(),
allDay: false,
rendering: 'background',
display: 'background',
classNames: [
'blocking-event-free-busy',
'blocking-event-free-busy--first-row',
@ -70,7 +70,7 @@ export default function(id, resources, eventStart, eventEnd) {
start: eventStart.toISOString(),
end: eventEnd.toISOString(),
allDay: false,
rendering: 'background',
display: 'background',
classNames: [
'blocking-event-free-busy',
'blocking-event-free-busy--last-row',
@ -83,7 +83,7 @@ export default function(id, resources, eventStart, eventEnd) {
start: eventStart.toISOString(),
end: eventEnd.toISOString(),
allDay: false,
rendering: 'background',
display: 'background',
classNames: [
'blocking-event-free-busy',
'blocking-event-free-busy--first-row',
@ -94,7 +94,7 @@ export default function(id, resources, eventStart, eventEnd) {
start: eventStart.toISOString(),
end: eventEnd.toISOString(),
allDay: false,
rendering: 'background',
display: 'background',
classNames: [
'blocking-event-free-busy',
],
@ -104,7 +104,7 @@ export default function(id, resources, eventStart, eventEnd) {
start: eventStart.toISOString(),
end: eventEnd.toISOString(),
allDay: false,
rendering: 'background',
display: 'background',
classNames: [
'blocking-event-free-busy',
'blocking-event-free-busy--last-row',