Loading src/components/CalendarGrid.vue +18 −2 Original line number Diff line number Diff line Loading @@ -142,7 +142,7 @@ export default { lazyFetching: false, nowIndicator: true, progressiveEventRendering: true, unselectAuto: true, unselectAuto: false, // Timezones: timeZone: this.timezoneId, } Loading Loading @@ -203,7 +203,7 @@ export default { resizeObserver.observe(this.$refs.fullCalendar.$el) } }, created() { async created() { this.updateTodayJob = setInterval(() => { const newDate = getYYYYMMDDFromFirstdayParam('now') Loading Loading @@ -244,6 +244,22 @@ export default { next() }) // Trigger the select event programmatically on initial page load to show the new event // in the grid. Wait for the next tick because the ref isn't available right away. await this.$nextTick() if (['NewPopoverView', 'NewSidebarView'].includes(this.$route.name)) { const start = new Date(parseInt(this.$route.params.dtstart) * 1000) const end = new Date(parseInt(this.$route.params.dtend) * 1000) if (!isNaN(start.getTime()) && !isNaN(end.getTime())) { const calendarApi = this.$refs.fullCalendar.getApi() calendarApi.select({ start, end, allDay: this.$route.params.allDay === '1', }) } } }, methods: { /** Loading src/views/EditSimple.vue +13 −23 Original line number Diff line number Diff line <!-- - @copyright Copyright (c) 2019 Georg Ehrke <oc.list@georgehrke.com> - @author Georg Ehrke <oc.list@georgehrke.com> - @author Richard Steinmetz <richard@steinmetz.cloud> - - @license GNU AGPL version 3 or any later version - Loading @@ -22,7 +23,7 @@ <template> <Popover ref="popover" :open="true" :open="isVisible" :auto-hide="false" :placement="placement" :boundaries-element="boundaryElement" Loading Loading @@ -165,17 +166,20 @@ export default { hasLocation: false, hasDescription: false, boundaryElement: document.querySelector('#app-content > .fc'), isVisible: true, } }, watch: { eventComponent() { const isNew = this.$route.name === 'NewPopoverView' this.$refs.popover .$children[0] .$refs.trigger = this.getDomElementForPopover(isNew, this.$route) this.$refs.popover .$children[0] .$_restartPopper() $route(to, from) { // Update the popover position by updating its reference element. const isNew = to.name === 'NewPopoverView' const popover = this.$refs.popover.$children[0] popover.$_updatePopper(() => { popover.popperInstance.reference = this.getDomElementForPopover(isNew, to) }) // Hide popover when changing the view until the user selects a slot again this.isVisible = to.params.view === from.params.view }, calendarObjectInstance() { this.hasLocation = false Loading @@ -193,15 +197,12 @@ export default { this.$nextTick(() => { const isNew = this.$route.name === 'NewPopoverView' // TODO: test beforeRouteUpdate // V3 of V-Tooltip will have a prop to define the reference element for popper.js // For now we have to stick to this ugly hack // https://github.com/Akryum/v-tooltip/issues/60 this.$refs.popover .$children[0] .$refs.trigger = this.getDomElementForPopover(isNew, this.$route) this.isVisible = true }) }, methods: { Loading Loading @@ -250,16 +251,5 @@ export default { return matchingDomObject }, }, beforeRouteUpdate(to, from, next) { const isNew = to.name === 'NewPopoverView' this.$refs.popover .$children[0] .$refs.trigger = this.getDomElementForPopover(isNew, to) this.$refs.popover .$children[0] .$_restartPopper() next() }, } </script> Loading
src/components/CalendarGrid.vue +18 −2 Original line number Diff line number Diff line Loading @@ -142,7 +142,7 @@ export default { lazyFetching: false, nowIndicator: true, progressiveEventRendering: true, unselectAuto: true, unselectAuto: false, // Timezones: timeZone: this.timezoneId, } Loading Loading @@ -203,7 +203,7 @@ export default { resizeObserver.observe(this.$refs.fullCalendar.$el) } }, created() { async created() { this.updateTodayJob = setInterval(() => { const newDate = getYYYYMMDDFromFirstdayParam('now') Loading Loading @@ -244,6 +244,22 @@ export default { next() }) // Trigger the select event programmatically on initial page load to show the new event // in the grid. Wait for the next tick because the ref isn't available right away. await this.$nextTick() if (['NewPopoverView', 'NewSidebarView'].includes(this.$route.name)) { const start = new Date(parseInt(this.$route.params.dtstart) * 1000) const end = new Date(parseInt(this.$route.params.dtend) * 1000) if (!isNaN(start.getTime()) && !isNaN(end.getTime())) { const calendarApi = this.$refs.fullCalendar.getApi() calendarApi.select({ start, end, allDay: this.$route.params.allDay === '1', }) } } }, methods: { /** Loading
src/views/EditSimple.vue +13 −23 Original line number Diff line number Diff line <!-- - @copyright Copyright (c) 2019 Georg Ehrke <oc.list@georgehrke.com> - @author Georg Ehrke <oc.list@georgehrke.com> - @author Richard Steinmetz <richard@steinmetz.cloud> - - @license GNU AGPL version 3 or any later version - Loading @@ -22,7 +23,7 @@ <template> <Popover ref="popover" :open="true" :open="isVisible" :auto-hide="false" :placement="placement" :boundaries-element="boundaryElement" Loading Loading @@ -165,17 +166,20 @@ export default { hasLocation: false, hasDescription: false, boundaryElement: document.querySelector('#app-content > .fc'), isVisible: true, } }, watch: { eventComponent() { const isNew = this.$route.name === 'NewPopoverView' this.$refs.popover .$children[0] .$refs.trigger = this.getDomElementForPopover(isNew, this.$route) this.$refs.popover .$children[0] .$_restartPopper() $route(to, from) { // Update the popover position by updating its reference element. const isNew = to.name === 'NewPopoverView' const popover = this.$refs.popover.$children[0] popover.$_updatePopper(() => { popover.popperInstance.reference = this.getDomElementForPopover(isNew, to) }) // Hide popover when changing the view until the user selects a slot again this.isVisible = to.params.view === from.params.view }, calendarObjectInstance() { this.hasLocation = false Loading @@ -193,15 +197,12 @@ export default { this.$nextTick(() => { const isNew = this.$route.name === 'NewPopoverView' // TODO: test beforeRouteUpdate // V3 of V-Tooltip will have a prop to define the reference element for popper.js // For now we have to stick to this ugly hack // https://github.com/Akryum/v-tooltip/issues/60 this.$refs.popover .$children[0] .$refs.trigger = this.getDomElementForPopover(isNew, this.$route) this.isVisible = true }) }, methods: { Loading Loading @@ -250,16 +251,5 @@ export default { return matchingDomObject }, }, beforeRouteUpdate(to, from, next) { const isNew = to.name === 'NewPopoverView' this.$refs.popover .$children[0] .$refs.trigger = this.getDomElementForPopover(isNew, to) this.$refs.popover .$children[0] .$_restartPopper() next() }, } </script>