diff --git a/application/views/pages/service_categories/service_categories_page.php b/application/views/pages/service_categories/service_categories_page.php index 87026ff0..dbc98fb1 100755 --- a/application/views/pages/service_categories/service_categories_page.php +++ b/application/views/pages/service_categories/service_categories_page.php @@ -9,9 +9,8 @@ - - + -
- +
-
+
+
+
+
+ - - -
-
-
- -
- - -
-
- - -
-
-
- - -

-
-
- -
-
-
- - -
- - -
- -

- - - - - -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- -
-
+ + +

+
- - -
-
-
-
-
- - -
-
- - -
-
-
-
- -

-
+
+
+
+ + +
-
-
-
- - - -
- - -
- -

- - - - - -
- - -
- -
- - -
+
+ +

+ + + + + +
+ + +
+ +
+ + +
+
diff --git a/assets/js/backend_categories.js b/assets/js/backend_categories.js new file mode 100644 index 00000000..d286652e --- /dev/null +++ b/assets/js/backend_categories.js @@ -0,0 +1,62 @@ +/* ---------------------------------------------------------------------------- + * Easy!Appointments - Open Source Web Scheduler + * + * @package EasyAppointments + * @author A.Tselegidis + * @copyright Copyright (c) 2013 - 2020, Alex Tselegidis + * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 + * @link http://easyappointments.org + * @since v1.0.0 + * ---------------------------------------------------------------------------- */ + +window.BackendCategories = window.BackendCategories || {}; + +/** + * Backend Categories + * + * This namespace handles the js functionality of the backend categories page. + * + * @module BackendCategories + */ +(function (exports) { + 'use strict'; + + /** + * Contains the basic record methods for the page. + * + * @type {CategoriesHelper} + */ + var helper; + + var categoriesHelper = new CategoriesHelper(); + + /** + * Default initialize method of the page. + * + * @param {Boolean} [defaultEventHandlers] Optional (true), determines whether to bind the default event handlers. + */ + exports.initialize = function (defaultEventHandlers) { + defaultEventHandlers = defaultEventHandlers || true; + + // Instantiate helper object (category helper by default). + helper = categoriesHelper; + helper.resetForm(); + helper.filter(''); + helper.bindEventHandlers(); + + if (defaultEventHandlers) { + bindEventHandlers(); + } + + Backend.placeFooterToBottom(); + }; + + /** + * Binds the default event handlers of the backend categories page. + * + * Do not use this method if you include the "BackendCategories" namespace on another page. + */ + function bindEventHandlers() { + // + } +})(window.BackendCategories); diff --git a/assets/js/backend_categories_helper.js b/assets/js/backend_categories_helper.js index 6976ee06..e5083fe3 100644 --- a/assets/js/backend_categories_helper.js +++ b/assets/js/backend_categories_helper.js @@ -244,7 +244,6 @@ this.resetForm(); $('#filter-categories .key').val(''); this.filter('', response.id, true); - BackendServices.updateAvailableCategories(); }.bind(this) ); }; @@ -268,7 +267,6 @@ this.resetForm(); this.filter($('#filter-categories .key').val()); - BackendServices.updateAvailableCategories(); }.bind(this) ); };