forked from mirrors/easyappointments
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();
|
addEventListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', initialize);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
resetModal,
|
resetModal,
|
||||||
initialize
|
initialize
|
||||||
|
|
|
@ -107,12 +107,6 @@ App.Pages.Calendar = (function () {
|
||||||
* @param {String} view Optional (default), the calendar view to be loaded.
|
* @param {String} view Optional (default), the calendar view to be loaded.
|
||||||
*/
|
*/
|
||||||
function initialize(view) {
|
function initialize(view) {
|
||||||
App.Utils.CalendarGoogleSync.initialize();
|
|
||||||
|
|
||||||
App.Components.AppointmentsModal.initialize();
|
|
||||||
|
|
||||||
App.Components.UnavailabilitiesModal.initialize();
|
|
||||||
|
|
||||||
// Load and initialize the calendar view.
|
// Load and initialize the calendar view.
|
||||||
if (view === 'table') {
|
if (view === 'table') {
|
||||||
App.Utils.CalendarTableView.initialize();
|
App.Utils.CalendarTableView.initialize();
|
||||||
|
|
|
@ -178,10 +178,15 @@ App.Utils.CalendarGoogleSync = (function () {
|
||||||
$.post(url, data);
|
$.post(url, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the module.
|
||||||
|
*/
|
||||||
function initialize() {
|
function initialize() {
|
||||||
bindEventHandlers();
|
bindEventHandlers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', initialize);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
initialize
|
initialize
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue