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

View file

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

View file

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

View file

@ -180,7 +180,7 @@ App.Pages.BookingSettings = (function () {
/** /**
* Initialize on document ready. * Initialize on document ready.
*/ */
function init() { function initialize() {
const bookingSettings = App.Vars.booking_settings; const bookingSettings = App.Vars.booking_settings;
deserialize(bookingSettings); deserialize(bookingSettings);
@ -196,7 +196,7 @@ App.Pages.BookingSettings = (function () {
Backend.placeFooterToBottom(); Backend.placeFooterToBottom();
} }
document.addEventListener('DOMContentLoaded', init); document.addEventListener('DOMContentLoaded', initialize);
return {}; 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); 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; const businessSettings = App.Vars.business_settings;
deserialize(businessSettings); deserialize(businessSettings);
@ -152,7 +152,7 @@ App.Pages.BusinessSettings = (function () {
Backend.placeFooterToBottom(); Backend.placeFooterToBottom();
} }
document.addEventListener('DOMContentLoaded', init); document.addEventListener('DOMContentLoaded', initialize);
return {}; return {};
})(); })();

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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