forked from mirrors/easyappointments
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.
|
* @param {String} view Optional (default), the calendar view to be loaded.
|
||||||
*/
|
*/
|
||||||
exports.initialize = function (view) {
|
exports.initialize = function (view) {
|
||||||
|
BackendCalendarGoogleSync.initialize();
|
||||||
|
BackendCalendarAppointmentsModal.initialize();
|
||||||
|
BackendCalendarUnavailabilitiesModal.initialize();
|
||||||
|
BackendCalendarExtraPeriodsModal.initialize();
|
||||||
|
|
||||||
// Load and initialize the calendar view.
|
// Load and initialize the calendar view.
|
||||||
if (view === 'table') {
|
if (view === 'table') {
|
||||||
BackendCalendarTableView.initialize();
|
BackendCalendarTableView.initialize();
|
||||||
|
@ -82,11 +87,6 @@ window.BackendCalendar = window.BackendCalendar || {};
|
||||||
BackendCalendarDefaultView.initialize();
|
BackendCalendarDefaultView.initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
BackendCalendarGoogleSync.initialize();
|
|
||||||
BackendCalendarAppointmentsModal.initialize();
|
|
||||||
BackendCalendarUnavailabilitiesModal.initialize();
|
|
||||||
BackendCalendarExtraPeriodsModal.initialize();
|
|
||||||
|
|
||||||
bindEventHandlers();
|
bindEventHandlers();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1475,7 +1475,7 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
|
||||||
|
|
||||||
$dialog.find('.modal-header h3').text(EALang.edit_appointment_title);
|
$dialog.find('.modal-header h3').text(EALang.edit_appointment_title);
|
||||||
$dialog.find('#appointment-id').val(appointment.id);
|
$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);
|
$dialog.find('#select-provider').val(appointment.id_users_provider);
|
||||||
|
|
||||||
// Set the start and end datetime of the appointment.
|
// Set the start and end datetime of the appointment.
|
||||||
|
|
Loading…
Reference in a new issue