Update the js doc content of the javascript files.

This commit is contained in:
Alex Tselegidis 2022-01-14 09:26:44 +01:00
parent f2c40a58b2
commit 32b6052546
52 changed files with 407 additions and 54 deletions

View file

@ -9,6 +9,11 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* App global namespace object.
*
* This script should be loaded before the other modules in order to define the global application namespace.
*/
window.App = (function () {
return {
Components: {},

View file

@ -10,13 +10,16 @@
* ---------------------------------------------------------------------------- */
/**
* Backend Calendar Appointments Modal
* Appointments modal component.
*
* This module implements the appointments modal functionality.
*
* Old Name: BackendCalendarAppointmentsModal
*/
App.Components.AppointmentsModal = (function () {
/**
* Update the displayed timezone.
*/
function updateTimezone() {
const providerId = $('#select-provider').val();
@ -29,6 +32,9 @@ App.Components.AppointmentsModal = (function () {
}
}
/**
* Bind the event handlers.
*/
function bindEventHandlers() {
/**
* Event: Manage Appointments Dialog Save Button "Click"
@ -213,6 +219,8 @@ App.Components.AppointmentsModal = (function () {
/**
* Event: Select Existing Customer From List "Click"
*
* @param {jQuery.Event}
*/
$('#appointments-modal').on('click', '#existing-customers-list div', (event) => {
const customerId = $(event.target).attr('data-id');
@ -240,6 +248,8 @@ App.Components.AppointmentsModal = (function () {
/**
* Event: Filter Existing Customers "Change"
*
* @param {jQuery.Event}
*/
$('#filter-existing-customers').on('keyup', (event) => {
if (filterExistingCustomersTimeout) {
@ -616,6 +626,9 @@ App.Components.AppointmentsModal = (function () {
}
}
/**
* Initialize the module.
*/
function initialize() {
bindEventHandlers();
}

View file

@ -10,13 +10,16 @@
* ---------------------------------------------------------------------------- */
/**
* Unavailabilities Modal
* Unavailabilities modal component.
*
* This module implements the unavailability events modal functionality.
* This module implements the unavailabilities modal functionality.
*
* Old Name: BackendCalendarUnavailabilityEventsModal
*/
App.Components.UnavailabilitiesModal = (function () {
/**
* Bind the event handlers.
*/
function bindEventHandlers() {
/**
* Event: Manage Unavailable Dialog Save Button "Click"
@ -292,6 +295,9 @@ App.Components.UnavailabilitiesModal = (function () {
$dialog.find('#unavailable-notes').val('');
}
/**
* Initialize the module.
*/
function initialize() {
const $unavailabilityProvider = $('#unavailable-provider');

View file

@ -9,6 +9,11 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* Working plan exceptions modal component.
*
* This module implements the working plan exceptions modal functionality.
*/
App.Components.WorkingPlanExceptionsModal = (function () {
const $modal = $('#working-plan-exceptions-modal');
const $date = $('#working-plan-exceptions-date');
@ -20,6 +25,9 @@ App.Components.WorkingPlanExceptionsModal = (function () {
let enableSubmit = false;
let enableCancel = false;
/**
* Reset the modal fields back to the original empty state.
*/
function resetModal() {
$date.val('');
$start.val('');
@ -27,6 +35,11 @@ App.Components.WorkingPlanExceptionsModal = (function () {
$breaks.find('tbody').empty();
}
/**
* Validate the modal form fields and return false if the validation fails.
*
* @returns {Boolean}
*/
function validate() {
$modal.find('.is-invalid').removeClass('is-invalid');
@ -51,10 +64,20 @@ App.Components.WorkingPlanExceptionsModal = (function () {
return !$modal.find('.is-invalid').length;
}
/**
* Event: On Modal "Hidden"
*
* This event is used to automatically reset the modal back to the original state.
*/
function onModalHidden() {
resetModal();
}
/**
* Serialize the entered break entries.
*
* @returns {Array}
*/
function getBreaks() {
const breaks = [];
@ -83,6 +106,11 @@ App.Components.WorkingPlanExceptionsModal = (function () {
return breaks;
}
/**
* Event: On Save "Click"
*
* Serialize the entire working plan exception and resolved the promise so that external code can save it.
*/
function onSaveClick() {
if (!deferred) {
return;
@ -106,6 +134,11 @@ App.Components.WorkingPlanExceptionsModal = (function () {
resetModal();
}
/**
* Enable the inline-editable table cell functionality for the provided target element..
*
* @param {jQuery} $target
*/
function editableTimeCell($target) {
$target.editable(
function (value) {
@ -140,6 +173,11 @@ App.Components.WorkingPlanExceptionsModal = (function () {
);
}
/**
* Open the modal and start adding a new working plan exception.
*
* @returns {jQuery.Deferred}
*/
function add() {
deferred = $.Deferred();
@ -152,6 +190,14 @@ App.Components.WorkingPlanExceptionsModal = (function () {
return deferred.promise();
}
/**
* Modify the provided working plan exception for the selected date.
*
* @param {String} date
* @param {Object} workingPlanException
*
* @return {jQuery.Deferred}
*/
function edit(date, workingPlanException) {
deferred = $.Deferred();
@ -172,6 +218,13 @@ App.Components.WorkingPlanExceptionsModal = (function () {
return deferred.promise();
}
/**
* Render a break table row based on the provided break period object.
*
* @param {Object} breakPeriod
*
* @return {jQuery}
*/
function renderBreakRow(breakPeriod) {
const timeFormat = App.Vars.time_format === 'regular' ? 'h:mm a' : 'HH:mm';
@ -233,6 +286,9 @@ App.Components.WorkingPlanExceptionsModal = (function () {
});
}
/**
* Event: Add Break "Click"
*/
function onAddBreakClick() {
const $newBreak = renderBreakRow({
start: '12:00',
@ -245,6 +301,9 @@ App.Components.WorkingPlanExceptionsModal = (function () {
$('.working-plan-exceptions-add-break').prop('disabled', true);
}
/**
* Event: Edit Break "Click"
*/
function onEditBreakClick() {
// Reset previous editable table cells.
const $previousEdits = $(this).closest('table').find('.editable');
@ -272,10 +331,16 @@ App.Components.WorkingPlanExceptionsModal = (function () {
$('.working-plan-exceptions-add-break').prop('disabled', true);
}
/**
* Event: Delete Break "Click"
*/
function onDeleteBreakClick() {
$(this).closest('tr').remove();
}
/**
* Event: Save Break "Click"
*/
function onSaveBreakClick() {
// Break's start time must always be prior to break's end.
const $tr = $(this).closest('tr');
@ -305,6 +370,9 @@ App.Components.WorkingPlanExceptionsModal = (function () {
$('.working-plan-exceptions-add-break').prop('disabled', false);
}
/**
* Event: Cancel Break "Click"
*/
function onCancelBreakClick() {
const $tr = $(this).closest('tr');
enableCancel = true;
@ -318,6 +386,11 @@ App.Components.WorkingPlanExceptionsModal = (function () {
$('.working-plan-exceptions-add-break').prop('disabled', false);
}
/**
* Initialize a datepicker instance on the provided target selector.
*
* @param {jQuery} $target
*/
function initializeDatepicker($target) {
let dateFormat;
@ -391,6 +464,11 @@ App.Components.WorkingPlanExceptionsModal = (function () {
});
}
/**
* Initialize a timepicker on the provided target selector.
*
* @param {jQuery} $target
*/
function initializeTimepicker($target) {
$target.timepicker({
timeFormat: App.Vars.time_format === 'regular' ? 'h:mm tt' : 'HH:mm',
@ -403,6 +481,9 @@ App.Components.WorkingPlanExceptionsModal = (function () {
});
}
/**
* Initialize the module.
*/
function initialize() {
initializeDatepicker($date);
initializeTimepicker($start);

View file

@ -9,6 +9,11 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* Account HTTP client.
*
* This module implements the account related HTTP requests.
*/
App.Http.Account = (function () {
/**
* Save account.

View file

@ -9,6 +9,11 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* Admins HTTP client.
*
* This module implements the admins related HTTP requests.
*/
App.Http.Admins = (function () {
/**
* Save (create or update) a admin.

View file

@ -9,7 +9,23 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* Appointments HTTP client.
*
* This module implements the appointments related HTTP requests.
*/
App.Http.Appointments = (function () {
/**
* Save (create or update) an appointment.
*
* @param {Object} appointment
*
* @return {Object}
*/
function save(appointment) {
return appointment.id ? update(appointment) : create(appointment);
}
/**
* Create an appointment.
*
@ -107,6 +123,7 @@ App.Http.Appointments = (function () {
}
return {
save,
create,
update,
destroy,

View file

@ -10,9 +10,9 @@
* ---------------------------------------------------------------------------- */
/**
* Booking HTTP Client
* Booking HTTP client.
*
* This module serves as the API consumer for the booking wizard of the app.
* This module implements the booking related HTTP requests.
*
* Old Name: FrontendBookApi
*/

View file

@ -9,6 +9,11 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* Booking Settings HTTP client.
*
* This module implements the booking settings related HTTP requests.
*/
App.Http.BookingSettings = (function () {
/**
* Save booking settings.

View file

@ -9,6 +9,11 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* Business Settings HTTP client.
*
* This module implements the business settings related HTTP requests.
*/
App.Http.BusinessSettings = (function () {
/**
* Save business settings.

View file

@ -10,9 +10,11 @@
* ---------------------------------------------------------------------------- */
/**
* Calendar HTTP Client
* Calendar HTTP client.
*
* Old Module Name: BackendCalendarApi
* This module implements the calendar related HTTP requests.
*
* Old Name: BackendCalendarApi
*/
App.Http.Calendar = (function () {
/**

View file

@ -9,6 +9,11 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* Categories HTTP client.
*
* This module implements the categories related HTTP requests.
*/
App.Http.Categories = (function () {
/**
* Save (create or update) a category.

View file

@ -9,6 +9,11 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* Customers HTTP client.
*
* This module implements the customers related HTTP requests.
*/
App.Http.Customers = (function () {
/**
* Save (create or update) a customer.

View file

@ -9,6 +9,11 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* General Settings HTTP client.
*
* This module implements the general settings related HTTP requests.
*/
App.Http.GeneralSettings = (function () {
/**
* Save general settings.

View file

@ -9,6 +9,11 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* Legal Settings HTTP client.
*
* This module implements the legal settings related HTTP requests.
*/
App.Http.LegalSettings = (function () {
/**
* Save legal settings.

View file

@ -9,6 +9,11 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* Providers HTTP client.
*
* This module implements the providers related HTTP requests.
*/
App.Http.Providers = (function () {
/**
* Save (create or update) a provider.

View file

@ -9,6 +9,11 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* Secretaries HTTP client.
*
* This module implements the secretaries related HTTP requests.
*/
App.Http.Secretaries = (function () {
/**
* Save (create or update) a secretary.

View file

@ -9,6 +9,11 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* Services HTTP client.
*
* This module implements the services related HTTP requests.
*/
App.Http.Services = (function () {
/**
* Save (create or update) a service.

View file

@ -9,7 +9,23 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* Settings HTTP client.
*
* This module implements the settings related HTTP requests.
*/
App.Http.Settings = (function () {
/**
* Save (create or update) a setting.
*
* @param {Object} setting
*
* @return {Object}
*/
function save(setting) {
return setting.id ? update(setting) : create(setting);
}
/**
* Create an setting.
*
@ -107,6 +123,7 @@ App.Http.Settings = (function () {
}
return {
save,
create,
update,
destroy,

View file

@ -9,7 +9,23 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* Unavailabilities HTTP client.
*
* This module implements the unavailabilities related HTTP requests.
*/
App.Http.Unavailabilities = (function () {
/**
* Save (create or update) an unavailability.
*
* @param {Object} unavailability
*
* @return {Object}
*/
function save(unavailability) {
return unavailability.id ? update(unavailability) : create(unavailability);
}
/**
* Create an unavailability.
*
@ -107,6 +123,7 @@ App.Http.Unavailabilities = (function () {
}
return {
save,
create,
update,
destroy,

View file

@ -9,6 +9,11 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* Account layout.
*
* This module implements the account layout functionality.
*/
window.App.Layouts.Account = (function () {
return {};
})();

View file

@ -9,6 +9,11 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* Backend layout.
*
* This module implements the backend layout functionality.
*/
window.App.Layouts.Backend = (function () {
return {};
})();

View file

@ -9,6 +9,11 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* Booking layout.
*
* This module implements the booking layout functionality.
*/
window.App.Layouts.Booking = (function () {
return {};
})();

View file

@ -9,6 +9,11 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* Message layout.
*
* This module implements the message layout functionality.
*/
window.App.Layouts.Message = (function () {
return {};
})();

View file

@ -10,9 +10,9 @@
* ---------------------------------------------------------------------------- */
/**
* Account
* Account page.
*
* Contains the functionality of the account page.
* This module implements the functionality of the account page.
*/
App.Pages.Account = (function () {
const $userId = $('#user-id');

View file

@ -10,9 +10,9 @@
* ---------------------------------------------------------------------------- */
/**
* Admins page module.
* Admins page.
*
* This module contains the methods that are used in the admins page.
* This module implements the functionality of admins page.
*/
App.Pages.Admins = (function () {
const $admins = $('#admins');
@ -20,7 +20,7 @@ App.Pages.Admins = (function () {
let filterLimit = 20;
/**
* Bind the event handlers for the backend/users "Admins" tab.
* Bind the event handlers.
*/
function bindEventHandlers() {
/**
@ -427,6 +427,9 @@ App.Pages.Admins = (function () {
}
}
/**
* Initialize the module.
*/
function initialize() {
resetForm();
filter('');

View file

@ -10,10 +10,9 @@
* ---------------------------------------------------------------------------- */
/**
* Booking Page
* Booking page.
*
* This module contains functions that implement the book appointment page functionality. Once the "initialize" method
* is called the page is fully functional and can serve the appointment booking process.
* This module implements the functionality of the booking page
*
* Old Name: FrontendBook
*/
@ -40,7 +39,7 @@ App.Pages.Booking = (function () {
let manageMode = false;
/**
* This method initializes the book appointment page.
* Initialize the module.
*/
function initialize() {
if (App.Vars.display_cookie_notice) {
@ -193,7 +192,7 @@ App.Pages.Booking = (function () {
}
/**
* This method binds the necessary event handlers for the book appointments page.
* Bind the event handlers.
*/
function bindEventHandlers() {
/**

View file

@ -9,6 +9,11 @@
* @since v1.0.0
* ---------------------------------------------------------------------------- */
/**
* Booking confirmation page.
*
* This module implements the functionality of the booking confirmation page.
*/
App.Pages.BookingConfirmation = (function () {
/**
* Handle Authorization Result
@ -102,6 +107,9 @@ App.Pages.BookingConfirmation = (function () {
}
}
/**
* Bind the event handlers.
*/
function bindEventHandlers() {
/**
* Event: Add Appointment to Google Calendar "Click"
@ -124,6 +132,9 @@ App.Pages.BookingConfirmation = (function () {
});
}
/**
* Initialize the module.
*/
function initialize() {
bindEventHandlers();
}

View file

@ -10,9 +10,9 @@
* ---------------------------------------------------------------------------- */
/**
* Booking Settings
* Booking settings page.
*
* Contains the functionality of the booking settings page.
* This module implements the functionality of the booking settings page.
*/
App.Pages.BookingSettings = (function () {
const $bookingSettings = $('#booking-settings');
@ -178,7 +178,7 @@ App.Pages.BookingSettings = (function () {
}
/**
* Initialize on document ready.
* Initialize the module.
*/
function initialize() {
const bookingSettings = App.Vars.booking_settings;

View file

@ -10,9 +10,9 @@
* ---------------------------------------------------------------------------- */
/**
* Business Settings
* Business settings page.
*
* Contains the functionality of the business settings page.
* This module implements the functionality of the business settings page.
*/
App.Pages.BusinessSettings = (function () {
const $saveSettings = $('#save-settings');
@ -127,6 +127,9 @@ App.Pages.BusinessSettings = (function () {
App.Utils.Message.show(App.Lang.working_plan, App.Lang.overwrite_existing_working_plans, buttons);
}
/**
* Initialize the module.
*/
function initialize() {
const businessSettings = App.Vars.business_settings;

View file

@ -10,13 +10,13 @@
* ---------------------------------------------------------------------------- */
/**
* Calendar Page
* Calendar page.
*
* This module contains functions that are used by the backend calendar page.
* This module implements the functionality of the backend calendar page.
*/
App.Pages.Calendar = (function () {
/**
* Bind common event handlers.
* Bind the event handlers.
*/
function bindEventHandlers() {
const $calendarPage = $('#calendar-page');
@ -98,10 +98,11 @@ App.Pages.Calendar = (function () {
}
/**
* Initialize Module
* Initialize the module.
*
* This function makes the necessary initialization for the default backend calendar page. If this module
* is used in another page then this function might not be needed.
* This function makes the necessary initialization for the default backend calendar page.
*
* If this module is used in another page then this function might not be needed.
*
* @param {String} view Optional (default), the calendar view to be loaded.
*/

View file

@ -9,13 +9,18 @@
* @since v1.0.0
* ---------------------------------------------------------------------------- */
/**
* Categories page.
*
* This module implements the functionality of the categories page.
*/
App.Pages.Categories = (function () {
const $categories = $('#categories');
let filterResults = {};
let filterLimit = 20;
/**
* Binds the default event handlers of the categories tab.
* Bind the event handlers.
*/
function bindEventHandlers() {
/**
@ -325,6 +330,9 @@ App.Pages.Categories = (function () {
}
}
/**
* Initialize the module.
*/
function initialize() {
resetForm();
filter('');

View file

@ -10,9 +10,9 @@
* ---------------------------------------------------------------------------- */
/**
* Customers page module.
* Customers page.
*
* This module contains the methods that are used in the customers page.
* This module implements the functionality of the customers page.
*/
App.Pages.Customers = (function () {
const $customers = $('#customers');
@ -20,7 +20,7 @@ App.Pages.Customers = (function () {
let filterLimit = 20;
/**
* Binds the default event handlers of the backend customers page.
* Bind the event handlers.
*/
function bindEventHandlers() {
/**
@ -431,6 +431,9 @@ App.Pages.Customers = (function () {
}
}
/**
* Initialize the module.
*/
function initialize() {
resetForm();
bindEventHandlers();

View file

@ -10,9 +10,9 @@
* ---------------------------------------------------------------------------- */
/**
* General Settings
* General settings page.
*
* Contains the functionality of the general settings page.
* This module implements the functionality of the general settings page.
*/
App.Pages.GeneralSettings = (function () {
const $saveSettings = $('#save-settings');
@ -88,6 +88,9 @@ App.Pages.GeneralSettings = (function () {
});
}
/**
* Initialize the module.
*/
function initialize() {
const generalSettings = App.Vars.general_settings;

View file

@ -9,6 +9,11 @@
* @since v1.0.0
* ---------------------------------------------------------------------------- */
/**
* Installation page.
*
* This module implements the functionality of the installation page.
*/
App.Pages.Installation = (function () {
const MIN_PASSWORD_LENGTH = 7;
const $install = $('#install');

View file

@ -10,9 +10,9 @@
* ---------------------------------------------------------------------------- */
/**
* Legal Settings
* Legal settings page.
*
* Contains the functionality of the legal settings page.
* This module implements the functionality of the legal settings page.
*/
App.Pages.LegalSettings = (function () {
const $saveSettings = $('#save-settings');
@ -137,6 +137,9 @@ App.Pages.LegalSettings = (function () {
});
}
/**
* Initialize the module.
*/
function initialize() {
$cookieNoticeContent.trumbowyg();
$termsAndConditionsContent.trumbowyg();

View file

@ -9,7 +9,12 @@
* @since v1.4.0
* ---------------------------------------------------------------------------- */
(function () {
/**
* Login page.
*
* This module implements the functionality of the login page.
*/
App.Pages.Login = (function () {
const $loginForm = $('#login-form');
/**
@ -44,4 +49,6 @@
}
$loginForm.on('submit', onLoginFormSubmit);
return {};
})();

View file

@ -9,16 +9,19 @@
* @since v1.0.0
* ---------------------------------------------------------------------------- */
/**
* Providers page.
*
* This module implements the functionality of the providers page.
*/
App.Pages.Providers = (function () {
const $providers = $('#providers');
let filterResults = {};
let filterLimit = 20;
let enableSubmit;
let enableCancel;
let workingPlanManager;
/**
* Bind the event handlers for the backend/users "Providers" tab.
* Bind the event handlers.
*/
function bindEventHandlers() {
/**
@ -503,6 +506,9 @@ App.Pages.Providers = (function () {
}
}
/**
* Initialize the module.
*/
function initialize() {
workingPlanManager = new App.Utils.WorkingPlan();
workingPlanManager.bindEventHandlers();

View file

@ -9,7 +9,12 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
(function () {
/**
* Recovery page.
*
* This module implements the functionality of the recovery page.
*/
App.Pages.Recovery = (function () {
const $form = $('form');
/**
@ -54,4 +59,6 @@
}
$form.on('submit', onFormSubmit);
return {};
})();

View file

@ -10,9 +10,9 @@
* ---------------------------------------------------------------------------- */
/**
* Secretaries page module.
* Secretaries page.
*
* This module contains the methods that are used in the admins page.
* This module implements the functionality of the secretaries page.
*/
App.Pages.Secretaries = (function () {
const $secretaries = $('#secretaries');
@ -20,7 +20,7 @@ App.Pages.Secretaries = (function () {
let filterLimit = 20;
/**
* Bind the event handlers for the backend/users "Secretaries" tab.
* Bind the event handlers.
*/
function bindEventHandlers() {
/**
@ -482,6 +482,9 @@ App.Pages.Secretaries = (function () {
}
}
/**
* Initialize the module.
*/
function initialize() {
resetForm();
filter('');

View file

@ -9,11 +9,19 @@
* @since v1.0.0
* ---------------------------------------------------------------------------- */
/**
* Services page.
*
* This module implements the functionality of the services page.
*/
App.Pages.Services = (function () {
const $services = $('#services');
let filterResults = {};
let filterLimit = 20;
/**
* Bind the event handlers.
*/
function bindEventHandlers() {
/**
* Event: Filter Services Form "Submit"
@ -380,6 +388,9 @@ App.Pages.Services = (function () {
});
}
/**
* Initialize the module.
*/
function initialize() {
resetForm();
filter('');

View file

@ -10,9 +10,9 @@
* ---------------------------------------------------------------------------- */
/**
* Calendar Default View
* Working plan utility.
*
* This module implements the default calendar view of backend.
* This module implements the functionality of the default calendar view.
*
* Old Name: BackendCalendarDefaultView
*/
@ -22,7 +22,7 @@ App.Utils.CalendarDefaultView = (function () {
let lastFocusedEventData; // Contains event data for later use.
/**
* Bind event handlers for the calendar view.
* Bind the event handlers.
*/
function bindEventHandlers() {
const $calendarPage = $('#calendar-page');

View file

@ -9,6 +9,11 @@
* @since v1.2.0
* ---------------------------------------------------------------------------- */
/**
* Calendar event popover utility.
*
* This module implements the functionality of calendar event popovers.
*/
App.Utils.CalendarEventPopover = (function () {
/**
* Render a map icon that links to Google maps.

View file

@ -10,15 +10,15 @@
* ---------------------------------------------------------------------------- */
/**
* Backend Calendar Google Sync
* Calendar Google sync utility.
*
* This module implements the Google Calendar sync operations.
* This module implements the functionality of calendar google sync.
*
* Old Name: BackendCalendarGoogleSync
*/
App.Utils.CalendarGoogleSync = (function () {
/**
* Bind event handlers.
* Bind the event handlers.
*/
function bindEventHandlers() {
/**

View file

@ -10,9 +10,9 @@
* ---------------------------------------------------------------------------- */
/**
* Backend Calendar
* Working plan utility.
*
* This module implements the table calendar view of backend.
* This module implements the functionality of table calendar view.
*
* Old Name: BackendCalendarTableView
*/
@ -22,7 +22,7 @@ App.Utils.CalendarTableView = (function () {
let lastFocusedEventData;
/**
* Bind page event handlers.
* Bind the event handlers.
*/
function bindEventHandlers() {
const $calendarToolbar = $('#calendar-toolbar');

View file

@ -9,6 +9,11 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* Date utility.
*
* This module implements the functionality of dates.
*/
window.App.Utils.Date = (function () {
/**
* Format a YYYY-MM-DD HH:mm:ss date string.

View file

@ -9,6 +9,11 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* HTTP requests utility.
*
* This module implements the functionality of HTTP requests.
*/
window.App.Utils.Http = (function () {
function request(method, url, data) {
return new Promise((resolve, reject) => {

View file

@ -9,6 +9,11 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* Messages utility.
*
* This module implements the functionality of messages.
*/
window.App.Utils.Message = (function () {
/**
* Show a message box to the user.

View file

@ -9,7 +9,19 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* Strings utility.
*
* This module implements the functionality of strings.
*/
window.App.Utils.String = (function () {
/**
* Upper case the first letter of the provided string.
*
* @param {String} value
*
* @returns {string}
*/
function upperCaseFirstLetter(value) {
return value.charAt(0).toUpperCase() + value.slice(1);
}

View file

@ -9,6 +9,11 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* URLs utility.
*
* This module implements the functionality of URLs.
*/
window.App.Utils.Url = (function () {
/**
* Get complete URL of the provided URI segment.

View file

@ -9,6 +9,11 @@
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* Validation utility.
*
* This module implements the functionality of validation.
*/
window.App.Utils.Validation = (function () {
/**
* Validate the provided email.

View file

@ -9,6 +9,11 @@
* @since v1.0.0
* ---------------------------------------------------------------------------- */
/**
* Working plan utility.
*
* This module implements the functionality of working plans.
*/
App.Utils.WorkingPlan = (function () {
/**
* Class WorkingPlan
@ -339,7 +344,7 @@ App.Utils.WorkingPlan = (function () {
};
/**
* Binds the event handlers for the working plan dom elements.
* Bind the event handlers.
*/
WorkingPlan.prototype.bindEventHandlers = function () {
/**