diff --git a/public/js/components/Calendar/Mode/Range.js b/public/js/components/Calendar/Mode/Range.js index 200fafa80..88eb225f5 100644 --- a/public/js/components/Calendar/Mode/Range.js +++ b/public/js/components/Calendar/Mode/Range.js @@ -147,7 +147,7 @@ export default { }); }, resetPrintLayout() { - const view = this.$el?.querySelector('.fhc-calendar-mode-week-view'); + const view = this.$el?.querySelector('.fhc-calendar-mode-range-view'); if (!view) return; Array.from(view.children).forEach((week) => { diff --git a/public/js/components/Calendar/Mode/Range/View.js b/public/js/components/Calendar/Mode/Range/View.js index e421e7143..0752b8ffc 100644 --- a/public/js/components/Calendar/Mode/Range/View.js +++ b/public/js/components/Calendar/Mode/Range/View.js @@ -27,6 +27,10 @@ export default { from: 'areGridWidthsEqual', default: true, }, + isInitialColumnWidthSyncPostponed: { + from: 'isInitialColumnWidthSyncPostponed', + default: false, + }, }, props: { day: { @@ -70,7 +74,19 @@ export default { this.scheduleGridWidthSync(); }, events:{ - handler() { + handler() { + if (this.events.length === 0 || this.events.every(event => event.type === 'loading')) { + return; + } + + if (this.isInitialColumnWidthSyncPostponed) { + this.isInitialColumnWidthSyncPostponed = false; + + setTimeout(() => { + this.startFreshColumnWidthSync(); + }, 200); + return; + } this.startFreshColumnWidthSync(); }, flush: 'post', diff --git a/public/js/components/Tempus/Renderer/Lehreinheit/calendarEvent.js b/public/js/components/Tempus/Renderer/Lehreinheit/calendarEvent.js index 47dabae56..074d2ab80 100644 --- a/public/js/components/Tempus/Renderer/Lehreinheit/calendarEvent.js +++ b/public/js/components/Tempus/Renderer/Lehreinheit/calendarEvent.js @@ -162,7 +162,7 @@ export default {