From 89acfafcceecdea5af48033b98b1c40232be12a3 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Wed, 2 Mar 2022 13:28:20 +0100 Subject: [PATCH] Improve popover handling while reloading appointments --- assets/js/utils/calendar_default_view.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/assets/js/utils/calendar_default_view.js b/assets/js/utils/calendar_default_view.js index 01507e4d..c492f0d6 100755 --- a/assets/js/utils/calendar_default_view.js +++ b/assets/js/utils/calendar_default_view.js @@ -44,6 +44,12 @@ App.Utils.CalendarDefaultView = (function () { $reloadAppointments.on('click', () => { const calendarView = fullCalendar.view; + const $popovers = $('.popover'); + + if ($popovers.length) { + $popovers.popover('dispose'); + } + refreshCalendarAppointments( $calendar, $selectFilterItem.val(), @@ -1682,6 +1688,10 @@ App.Utils.CalendarDefaultView = (function () { // Automatically refresh the calendar page every 10 seconds (without loading animation). setInterval(() => { + if ($('.popover').length) { + return; + } + refreshCalendarAppointments( $calendar, $selectFilterItem.val(),