Rename "init" methods to "initialize".

This commit is contained in:
Alex Tselegidis 2022-01-14 08:31:12 +01:00
parent f327fd5221
commit a89a6d8faf
12 changed files with 24 additions and 24 deletions

View File

@ -403,7 +403,7 @@ App.Components.WorkingPlanExceptionsModal = (function () {
});
}
function init() {
function initialize() {
initializeDatepicker($date);
initializeTimepicker($start);
initializeTimepicker($end);
@ -419,7 +419,7 @@ App.Components.WorkingPlanExceptionsModal = (function () {
$save.on('click', onSaveClick);
}
document.addEventListener('DOMContentLoaded', init);
document.addEventListener('DOMContentLoaded', initialize);
return {
add,

View File

@ -179,7 +179,7 @@ App.Pages.Account = (function () {
/**
* Initialize the page.
*/
function init() {
function initialize() {
const account = App.Vars.account;
deserialize(account);
@ -191,7 +191,7 @@ App.Pages.Account = (function () {
Backend.placeFooterToBottom();
}
document.addEventListener('DOMContentLoaded', init);
document.addEventListener('DOMContentLoaded', initialize);
return {};
})();

View File

@ -427,13 +427,13 @@ App.Pages.Admins = (function () {
}
}
function init() {
function initialize() {
resetForm();
filter('');
bindEventHandlers();
}
document.addEventListener('DOMContentLoaded', init);
document.addEventListener('DOMContentLoaded', initialize);
return {
filter,

View File

@ -180,7 +180,7 @@ App.Pages.BookingSettings = (function () {
/**
* Initialize on document ready.
*/
function init() {
function initialize() {
const bookingSettings = App.Vars.booking_settings;
deserialize(bookingSettings);
@ -196,7 +196,7 @@ App.Pages.BookingSettings = (function () {
Backend.placeFooterToBottom();
}
document.addEventListener('DOMContentLoaded', init);
document.addEventListener('DOMContentLoaded', initialize);
return {};
})();

View File

@ -127,7 +127,7 @@ App.Pages.BusinessSettings = (function () {
App.Utils.Message.show(App.Lang.working_plan, App.Lang.overwrite_existing_working_plans, buttons);
}
function init() {
function initialize() {
const businessSettings = App.Vars.business_settings;
deserialize(businessSettings);
@ -152,7 +152,7 @@ App.Pages.BusinessSettings = (function () {
Backend.placeFooterToBottom();
}
document.addEventListener('DOMContentLoaded', init);
document.addEventListener('DOMContentLoaded', initialize);
return {};
})();

View File

@ -325,13 +325,13 @@ App.Pages.Categories = (function () {
}
}
function init() {
function initialize() {
resetForm();
filter('');
bindEventHandlers();
}
document.addEventListener('DOMContentLoaded', init);
document.addEventListener('DOMContentLoaded', initialize);
return {
filter,

View File

@ -431,13 +431,13 @@ App.Pages.Customers = (function () {
}
}
function init() {
function initialize() {
resetForm();
bindEventHandlers();
filter('');
}
document.addEventListener('DOMContentLoaded', init);
document.addEventListener('DOMContentLoaded', initialize);
return {
filter,

View File

@ -88,7 +88,7 @@ App.Pages.GeneralSettings = (function () {
});
}
function init() {
function initialize() {
const generalSettings = App.Vars.general_settings;
deserialize(generalSettings);
@ -98,7 +98,7 @@ App.Pages.GeneralSettings = (function () {
Backend.placeFooterToBottom();
}
document.addEventListener('DOMContentLoaded', init);
document.addEventListener('DOMContentLoaded', initialize);
return {};
})();

View File

@ -137,7 +137,7 @@ App.Pages.LegalSettings = (function () {
});
}
function init() {
function initialize() {
$cookieNoticeContent.trumbowyg();
$termsAndConditionsContent.trumbowyg();
$privacyPolicyContent.trumbowyg();
@ -151,7 +151,7 @@ App.Pages.LegalSettings = (function () {
Backend.placeFooterToBottom();
}
document.addEventListener('DOMContentLoaded', init);
document.addEventListener('DOMContentLoaded', initialize);
return {};
})();

View File

@ -503,7 +503,7 @@ App.Pages.Providers = (function () {
}
}
function init() {
function initialize() {
workingPlanManager = new App.Utils.WorkingPlan();
workingPlanManager.bindEventHandlers();
@ -538,7 +538,7 @@ App.Pages.Providers = (function () {
});
}
document.addEventListener('DOMContentLoaded', init);
document.addEventListener('DOMContentLoaded', initialize);
return {
filter,

View File

@ -482,7 +482,7 @@ App.Pages.Secretaries = (function () {
}
}
function init() {
function initialize() {
resetForm();
filter('');
bindEventHandlers();
@ -511,7 +511,7 @@ App.Pages.Secretaries = (function () {
});
}
document.addEventListener('DOMContentLoaded', init);
document.addEventListener('DOMContentLoaded', initialize);
return {};
})();

View File

@ -380,14 +380,14 @@ App.Pages.Services = (function () {
});
}
function init() {
function initialize() {
resetForm();
filter('');
bindEventHandlers();
updateAvailableCategories();
}
document.addEventListener('DOMContentLoaded', init);
document.addEventListener('DOMContentLoaded', initialize);
return {
filter,