2015-07-20 22:41:24 +03:00
|
|
|
/* ----------------------------------------------------------------------------
|
|
|
|
* Easy!Appointments - Open Source Web Scheduler
|
2015-10-09 00:12:59 +03:00
|
|
|
*
|
2015-07-20 22:41:24 +03:00
|
|
|
* @package EasyAppointments
|
|
|
|
* @author A.Tselegidis <alextselegidis@gmail.com>
|
2020-03-11 12:10:59 +03:00
|
|
|
* @copyright Copyright (c) 2013 - 2020, Alex Tselegidis
|
2015-10-09 00:12:59 +03:00
|
|
|
* @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 || {};
|
2016-04-02 15:58:21 +03:00
|
|
|
|
2013-07-05 11:39:52 +03:00
|
|
|
/**
|
2016-04-02 15:58:21 +03:00
|
|
|
* Backend Customers
|
|
|
|
*
|
2016-10-10 19:29:48 +03:00
|
|
|
* Backend Customers javascript namespace. Contains the main functionality of the backend customers
|
2016-05-15 13:13:56 +03:00
|
|
|
* 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
|
|
|
*
|
2016-04-02 15:58:21 +03:00
|
|
|
* @module BackendCustomers
|
2013-07-05 11:39:52 +03:00
|
|
|
*/
|
2018-01-23 12:08:37 +03:00
|
|
|
(function (exports) {
|
2016-04-02 15:58:21 +03:00
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
2013-09-25 18:43:17 +03:00
|
|
|
/**
|
2015-10-09 00:12:59 +03:00
|
|
|
* The page helper contains methods that implement each record type functionality
|
2013-09-25 18:43:17 +03:00
|
|
|
* (for now there is only the CustomersHelper).
|
2015-10-09 00:12:59 +03:00
|
|
|
*
|
2016-05-15 13:13:56 +03:00
|
|
|
* @type {Object}
|
2013-09-25 18:43:17 +03:00
|
|
|
*/
|
2016-04-02 15:58:21 +03:00
|
|
|
var helper = {};
|
|
|
|
|
2016-05-20 10:08:41 +03:00
|
|
|
/**
|
|
|
|
* 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) {
|
2016-05-20 10:08:41 +03:00
|
|
|
defaultEventHandlers = defaultEventHandlers || false;
|
2016-04-02 15:58:21 +03:00
|
|
|
|
2016-05-20 10:08:41 +03:00
|
|
|
helper = new CustomersHelper();
|
|
|
|
helper.resetForm();
|
|
|
|
helper.filter('');
|
2015-10-09 00:12:59 +03:00
|
|
|
|
2016-05-20 10:08:41 +03:00
|
|
|
if (defaultEventHandlers) {
|
2020-05-06 20:23:49 +03:00
|
|
|
bindEventHandlers();
|
2016-05-20 10:08:41 +03:00
|
|
|
}
|
|
|
|
};
|
2015-10-09 00:12:59 +03:00
|
|
|
|
2013-07-06 03:00:04 +03:00
|
|
|
/**
|
|
|
|
* Default event handlers declaration for backend customers page.
|
|
|
|
*/
|
2020-05-06 20:23:49 +03:00
|
|
|
function bindEventHandlers() {
|
2016-05-20 10:08:41 +03:00
|
|
|
helper.bindEventHandlers();
|
|
|
|
}
|
2013-09-25 18:43:17 +03:00
|
|
|
|
2016-04-02 15:58:21 +03:00
|
|
|
})(window.BackendCustomers);
|