mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-10 01:52:22 +03:00
Corrected initialization problem with CategoriesHelper instance.
This commit is contained in:
parent
bc217728af
commit
6ab4344187
1 changed files with 7 additions and 7 deletions
|
@ -29,6 +29,9 @@ window.BackendServices = window.BackendServices || {};
|
|||
*/
|
||||
var helper;
|
||||
|
||||
var servicesHelper = new ServicesHelper();
|
||||
var categoriesHelper = new CategoriesHelper();
|
||||
|
||||
/**
|
||||
* Default initialize method of the page.
|
||||
*
|
||||
|
@ -80,10 +83,10 @@ window.BackendServices = window.BackendServices || {};
|
|||
|
||||
if ($(this).hasClass('services-tab')) { // display services tab
|
||||
$('#services').show();
|
||||
helper = new ServicesHelper();
|
||||
helper = servicesHelper;
|
||||
} else if ($(this).hasClass('categories-tab')) { // display categories tab
|
||||
$('#categories').show();
|
||||
helper = new CategoriesHelper();
|
||||
helper = categoriesHelper;
|
||||
}
|
||||
|
||||
helper.resetForm();
|
||||
|
@ -92,11 +95,8 @@ window.BackendServices = window.BackendServices || {};
|
|||
Backend.placeFooterToBottom();
|
||||
});
|
||||
|
||||
helper.bindEventHandlers();
|
||||
|
||||
// @todo Bind and unbind the events dynamically on tab click.
|
||||
var tmpHelper = new CategoriesHelper();
|
||||
tmpHelper.bindEventHandlers();
|
||||
servicesHelper.bindEventHandlers();
|
||||
categoriesHelper.bindEventHandlers();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue