easyappointments/assets/js/pages/backend_customers.js

66 lines
2 KiB
JavaScript
Raw Normal View History

2015-07-20 22:41:24 +03:00
/* ----------------------------------------------------------------------------
* Easy!Appointments - Open Source Web Scheduler
*
2015-07-20 22:41:24 +03:00
* @package EasyAppointments
* @author A.Tselegidis <alextselegidis@gmail.com>
* @copyright Copyright (c) 2013 - 2020, Alex Tselegidis
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
2015-07-20 22:41:24 +03:00
* @link http://easyappointments.org
* @since v1.0.0
* ---------------------------------------------------------------------------- */
2018-01-23 12:08:37 +03:00
window.BackendCustomers = window.BackendCustomers || {};
2013-07-05 11:39:52 +03:00
/**
* Backend Customers
*
2016-10-10 19:29:48 +03:00
* Backend Customers javascript namespace. Contains the main functionality of the backend customers
* page. If you need to use this namespace in a different page, do not bind the default event handlers
* during initialization.
2013-07-05 11:39:52 +03:00
*
* @module BackendCustomers
2013-07-05 11:39:52 +03:00
*/
2018-01-23 12:08:37 +03:00
(function (exports) {
'use strict';
/**
* The page helper contains methods that implement each record type functionality
* (for now there is only the CustomersHelper).
*
* @type {Object}
*/
var helper = {};
/**
* This method initializes the backend customers page. If you use this namespace
* in a different page do not use this method.
*
* @param {Boolean} defaultEventHandlers Optional (false), whether to bind the default
* event handlers or not.
*/
2018-01-23 12:08:37 +03:00
exports.initialize = function (defaultEventHandlers) {
defaultEventHandlers = defaultEventHandlers || false;
// Add the available languages to the language dropdown.
2020-06-16 18:01:27 +03:00
availableLanguages.forEach(function (language) {
$('#language').append(new Option(language, language));
});
helper = new CustomersHelper();
helper.resetForm();
helper.filter('');
helper.bindEventHandlers();
if (defaultEventHandlers) {
bindEventHandlers();
}
};
/**
* Default event handlers declaration for backend customers page.
*/
function bindEventHandlers() {
//
}
})(window.BackendCustomers);