mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-25 01:12:21 +03:00
Register modal events before using them, e.g. when provider edits an existing appointment via link (#839)
This commit is contained in:
parent
395b329e78
commit
6c8fea4ad8
2 changed files with 6 additions and 6 deletions
|
@ -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();
|
||||
};
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue