' +
+ '
' +
'' + category.name + '' +
'
';
@@ -324,11 +324,11 @@
CategoriesHelper.prototype.select = function(id, display) {
display = display || false;
- $('#filter-categories .selected-row').removeClass('selected-row');
+ $('#filter-categories .selected').removeClass('selected');
$('#filter-categories .category-row').each(function() {
if ($(this).attr('data-id') === id) {
- $(this).addClass('selected-row');
+ $(this).addClass('selected');
return false;
}
});
diff --git a/src/assets/js/backend_services.js b/src/assets/js/backend_services.js
index 39e5881b..9203873f 100644
--- a/src/assets/js/backend_services.js
+++ b/src/assets/js/backend_services.js
@@ -53,7 +53,7 @@ window.BackendServices = window.BackendServices || {};
});
// Instantiate helper object (service helper by default).
- helper = new ServicesHelper();
+ helper = servicesHelper;
helper.resetForm();
helper.filter('');
diff --git a/src/assets/js/backend_services_helper.js b/src/assets/js/backend_services_helper.js
index f63d4e92..1c6d83f1 100644
--- a/src/assets/js/backend_services_helper.js
+++ b/src/assets/js/backend_services_helper.js
@@ -34,7 +34,7 @@
*/
$('#filter-services form').submit(function(event) {
var key = $('#filter-services .key').val();
- $('#filter-services .selected-row').removeClass('selected-row');
+ $('#filter-services .selected').removeClass('selected');
instance.resetForm();
instance.filter(key);
return false;
@@ -70,8 +70,8 @@
});
instance.display(service);
- $('#filter-services .selected-row').removeClass('selected-row');
- $(this).addClass('selected-row');
+ $('#filter-services .selected').removeClass('selected');
+ $(this).addClass('selected');
$('#edit-service, #delete-service').prop('disabled', false);
});
@@ -82,8 +82,8 @@
instance.resetForm();
$('#services .add-edit-delete-group').hide();
$('#services .save-cancel-group').show();
- $('#services .details').find('input, textarea').prop('readonly', false);
- $('#services .details').find('select').prop('disabled', false);
+ $('#services .record-details').find('input, textarea').prop('readonly', false);
+ $('#services .record-details').find('select').prop('disabled', false);
$('#service-duration').spinner('enable');
$('#filter-services button').prop('disabled', true);
@@ -138,8 +138,8 @@
$('#edit-service').click(function() {
$('#services .add-edit-delete-group').hide();
$('#services .save-cancel-group').show();
- $('#services .details').find('input, textarea').prop('readonly', false);
- $('#services .details select').prop('disabled', false);
+ $('#services .record-details').find('input, textarea').prop('readonly', false);
+ $('#services .record-details select').prop('disabled', false);
$('#service-duration').spinner('enable');
$('#filter-services button').prop('disabled', true);
@@ -251,16 +251,16 @@
* Resets the service tab form back to its initial state.
*/
ServicesHelper.prototype.resetForm = function() {
- $('#services .details').find('input, textarea').val('');
+ $('#services .record-details').find('input, textarea').val('');
$('#service-category').val('null');
$('#services .add-edit-delete-group').show();
$('#services .save-cancel-group').hide();
$('#edit-service, #delete-service').prop('disabled', true);
- $('#services .details').find('input, textarea').prop('readonly', true);
+ $('#services .record-details').find('input, textarea').prop('readonly', true);
$('#service-category').prop('disabled', true);
$('#service-duration').spinner('disable');
- $('#filter-services .selected-row').removeClass('selected-row');
+ $('#filter-services .selected').removeClass('selected');
$('#filter-services button').prop('disabled', false);
$('#filter-services .results').css('color', '');
};
@@ -335,7 +335,7 @@
*/
ServicesHelper.prototype.getFilterHtml = function(service) {
var html =
- '
' +
+ '
' +
'' + service.name + '
' +
service.duration + ' min - ' +
service.price + ' ' + service.currency + '
' +
@@ -354,11 +354,11 @@
ServicesHelper.prototype.select = function(id, display) {
display = display || false;
- $('#filter-services .selected-row').removeClass('selected-row');
+ $('#filter-services .selected').removeClass('selected');
$('#filter-services .service-row').each(function() {
if ($(this).attr('data-id') === id) {
- $(this).addClass('selected-row');
+ $(this).addClass('selected');
return false;
}
});