diff --git a/assets/js/backend_calendar.js b/assets/js/backend_calendar.js index 45253c3a..1f30959b 100755 --- a/assets/js/backend_calendar.js +++ b/assets/js/backend_calendar.js @@ -75,6 +75,11 @@ window.BackendCalendar = window.BackendCalendar || {}; * @param {String} view Optional (default), the calendar view to be loaded. */ exports.initialize = function (view) { + BackendCalendarGoogleSync.initialize(); + BackendCalendarAppointmentsModal.initialize(); + BackendCalendarUnavailabilitiesModal.initialize(); + BackendCalendarExtraPeriodsModal.initialize(); + // Load and initialize the calendar view. if (view === 'table') { BackendCalendarTableView.initialize(); @@ -82,11 +87,6 @@ window.BackendCalendar = window.BackendCalendar || {}; BackendCalendarDefaultView.initialize(); } - BackendCalendarGoogleSync.initialize(); - BackendCalendarAppointmentsModal.initialize(); - BackendCalendarUnavailabilitiesModal.initialize(); - BackendCalendarExtraPeriodsModal.initialize(); - bindEventHandlers(); }; diff --git a/assets/js/backend_calendar_default_view.js b/assets/js/backend_calendar_default_view.js index 50a6cd14..b3055db0 100755 --- a/assets/js/backend_calendar_default_view.js +++ b/assets/js/backend_calendar_default_view.js @@ -1475,7 +1475,7 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {}; $dialog.find('.modal-header h3').text(EALang.edit_appointment_title); $dialog.find('#appointment-id').val(appointment.id); - $dialog.find('#select-service').val(appointment.id_services).change(); + $dialog.find('#select-service').val(appointment.id_services).trigger('change'); $dialog.find('#select-provider').val(appointment.id_users_provider); // Set the start and end datetime of the appointment.