The initialize method will be called by the DOMContentLoaded event automatically.
This commit is contained in:
parent
8438f647f0
commit
9467113ad9
3 changed files with 7 additions and 6 deletions
|
@ -636,6 +636,8 @@ App.Components.AppointmentsModal = (function () {
|
|||
addEventListeners();
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', initialize);
|
||||
|
||||
return {
|
||||
resetModal,
|
||||
initialize
|
||||
|
|
|
@ -107,12 +107,6 @@ App.Pages.Calendar = (function () {
|
|||
* @param {String} view Optional (default), the calendar view to be loaded.
|
||||
*/
|
||||
function initialize(view) {
|
||||
App.Utils.CalendarGoogleSync.initialize();
|
||||
|
||||
App.Components.AppointmentsModal.initialize();
|
||||
|
||||
App.Components.UnavailabilitiesModal.initialize();
|
||||
|
||||
// Load and initialize the calendar view.
|
||||
if (view === 'table') {
|
||||
App.Utils.CalendarTableView.initialize();
|
||||
|
|
|
@ -178,10 +178,15 @@ App.Utils.CalendarGoogleSync = (function () {
|
|||
$.post(url, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the module.
|
||||
*/
|
||||
function initialize() {
|
||||
bindEventHandlers();
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', initialize);
|
||||
|
||||
return {
|
||||
initialize
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue