Removed console.log calls from the javascript files.

This commit is contained in:
Alex Tselegidis 2016-04-02 12:02:17 +02:00
parent cf6e635aad
commit 5ad3041c2c
11 changed files with 31 additions and 212 deletions

View file

@ -310,10 +310,6 @@ var BackendCalendar = {
'url': getUrl,
'dataType': 'json',
'success': function(response) {
/////////////////////////////////////////////////
console.log('Google Sync Response:', response);
/////////////////////////////////////////////////
if (response.exceptions) {
response.exceptions = GeneralFunctions.parseExceptions(response.exceptions);
GeneralFunctions.displayMessageBox(GeneralFunctions.EXCEPTIONS_TITLE,
@ -445,10 +441,6 @@ var BackendCalendar = {
};
$.post(postUrl, postData, function(response) {
/////////////////////////////////////////////////////////
console.log('Delete Appointment Response :', response);
/////////////////////////////////////////////////////////
$('#message_box').dialog('close');
if (response.exceptions) {
@ -487,10 +479,6 @@ var BackendCalendar = {
};
$.post(postUrl, postData, function(response) {
/////////////////////////////////////////////////////////
console.log('Delete Unavailable Response :', response);
/////////////////////////////////////////////////////////
$('#message_box').dialog('close');
if (response.exceptions) {
@ -642,10 +630,6 @@ var BackendCalendar = {
}
var successCallback = function(response) {
///////////////////////////////////////////////////////////////////
//console.log('Save Unavailable Time Period Response:', response);
///////////////////////////////////////////////////////////////////
if (response.exceptions) {
response.exceptions = GeneralFunctions.parseExceptions(response.exceptions);
GeneralFunctions.displayMessageBox(GeneralFunctions.EXCEPTIONS_TITLE, GeneralFunctions.EXCEPTIONS_MESSAGE);
@ -682,10 +666,6 @@ var BackendCalendar = {
};
var errorCallback = function(jqXHR, textStatus, errorThrown) {
////////////////////////////////////////////////////////////////////////
console.log('Save Unavailable Error:', jqXHR, textStatus, errorThrown);
////////////////////////////////////////////////////////////////////////
GeneralFunctions.displayMessageBox('Communication Error', 'Unfortunately ' +
'the operation could not complete due to server communication errors.');
@ -746,10 +726,6 @@ var BackendCalendar = {
'provider_id': $('#select-filter-item').val()
};
$.post(postUrl, postData, function(response) {
///////////////////////////////////////////////////////////////////
console.log('Get Available Google Calendars Response', response);
///////////////////////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
$('#google-calendar').empty();
@ -941,10 +917,6 @@ var BackendCalendar = {
timeout: 1000,
global: false,
success: function(response) {
/////////////////////////////////////////////////////////////
// console.log('Filter Customers Appointment Response:', response);
/////////////////////////////////////////////////////////////
$list.empty();
$.each(response, function(index, c) {
$list.append('<div data-id="' + c.id + '">'
@ -961,10 +933,6 @@ var BackendCalendar = {
});
},
error: function(jqXHR, textStatus, errorThrown) {
//////////////////////////////////////////////////////////////////
// console.log('Filter Customers Appointment Error:', jqXHR, textStatus, errorThrown);
//////////////////////////////////////////////////////////////////
// If there is any error on the request, search by the local client database.
$list.empty();
$.each(GlobalVariables.customers, function(index, c) {
@ -1037,10 +1005,7 @@ var BackendCalendar = {
'provider_id': $('#select-filter-item').val(),
'calendar_id': $('#google-calendar').val()
};
$.post(postUrl, postData, function(response){
///////////////////////////////////////////////////////////
console.log('Select Google Calendar Response', response);
///////////////////////////////////////////////////////////
$.post(postUrl, postData, function(response) {
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
Backend.displayNotification(EALang['google_calendar_selected']);
$('#select-google-calendar').modal('hide');
@ -1089,10 +1054,6 @@ var BackendCalendar = {
};
$.post(postUrl, postData, function(response) {
////////////////////////////////////////////////////////////////////
console.log('Refresh Calendar Appointments Response :', response);
////////////////////////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
// :: ADD APPOINTMENTS TO CALENDAR
@ -1364,20 +1325,11 @@ var BackendCalendar = {
'data': postData,
'dataType': 'json',
'success': function(response) {
/////////////////////////////////////////////////////////////
console.log('Save Appointment Data Response:', response);
/////////////////////////////////////////////////////////////
if (successCallback !== undefined) {
successCallback(response);
}
},
'error': function(jqXHR, textStatus, errorThrown) {
//////////////////////////////////////////////////////////////////
console.log('Save Appointment Data Error:', jqXHR, textStatus,
errorThrown);
//////////////////////////////////////////////////////////////////
if (errorCallback !== undefined) {
errorCallback();
}
@ -1786,8 +1738,6 @@ var BackendCalendar = {
}
var successCallback = function(response) {
console.log('Drop Unavailable Event Response:', response);
if (response.exceptions) {
response.exceptions = GeneralFunctions.parseExceptions(response.exceptions);
GeneralFunctions.displayMessageBox(GeneralFunctions.EXCEPTIONS_TITLE, GeneralFunctions.EXCEPTIONS_MESSAGE);
@ -1887,10 +1837,6 @@ var BackendCalendar = {
};
$.post(postUrl, postData, function(response) {
////////////////////////////////////////////////////////////
//console.log('Disable Provider Sync Response :', response);
////////////////////////////////////////////////////////////
if (response.exceptions) {
response.exceptions = GeneralFunctions.parseExceptions(response.exceptions);
GeneralFunctions.displayMessageBox(GeneralFunctions.EXCEPTIONS_TITLE, GeneralFunctions.EXCEPTIONS_MESSAGE);

View file

@ -234,10 +234,6 @@ CustomersHelper.prototype.save = function(customer) {
};
$.post(postUrl, postData, function(response) {
///////////////////////////////////////////////////////////
console.log('Save Customer Response:', response);
///////////////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
Backend.displayNotification(EALang['customer_saved']);
@ -260,10 +256,6 @@ CustomersHelper.prototype.delete = function(id) {
};
$.post(postUrl, postData, function(response) {
////////////////////////////////////////////////////
//console.log('Delete customer response:', response);
////////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
Backend.displayNotification(EALang['customer_deleted']);
@ -382,10 +374,6 @@ CustomersHelper.prototype.filter = function(key, selectId, display) {
};
$.post(postUrl, postData, function(response) {
///////////////////////////////////////////////////////
console.log('Filter Customers Response:', response);
///////////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
BackendCustomers.helper.filterResults = response;

View file

@ -100,10 +100,6 @@ var BackendServices = {
};
$.post(postUrl, postData, function(response) {
///////////////////////////////////////////////////////////////
console.log('Update Available Categories Response:', response);
///////////////////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
GlobalVariables.categories = response;
@ -270,10 +266,6 @@ ServicesHelper.prototype.bindEventHandlers = function() {
* then the update operation is going to be executed.
*/
ServicesHelper.prototype.save = function(service) {
////////////////////////////////////////////////
//console.log('Service data to save:', service);
////////////////////////////////////////////////
var postUrl = GlobalVariables.baseUrl + '/index.php/backend_api/ajax_save_service';
var postData = {
'csrfToken': GlobalVariables.csrfToken,
@ -281,9 +273,6 @@ ServicesHelper.prototype.save = function(service) {
};
$.post(postUrl, postData, function(response) {
//////////////////////////////////////////////////
//console.log('Save Service Response:', response);
//////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
Backend.displayNotification(EALang['service_saved']);
@ -306,10 +295,6 @@ ServicesHelper.prototype.delete = function(id) {
};
$.post(postUrl, postData, function(response) {
////////////////////////////////////////////////////
//console.log('Delete service response:', response);
////////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
Backend.displayNotification(EALang['service_deleted']);
@ -402,10 +387,6 @@ ServicesHelper.prototype.filter = function(key, selectId, display) {
};
$.post(postUrl, postData, function(response) {
/////////////////////////////////////////////////////
//console.log('Filter services response:', response);
/////////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
BackendServices.helper.filterResults = response;
@ -626,10 +607,6 @@ CategoriesHelper.prototype.filter = function(key, selectId, display) {
};
$.post(postUrl, postData, function(response) {
///////////////////////////////////////////////////////
console.log('Filter Categories Response:', response);
///////////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
BackendServices.helper.filterResults = response;
@ -666,10 +643,6 @@ CategoriesHelper.prototype.save = function(category) {
};
$.post(postUrl, postData, function(response) {
///////////////////////////////////////////////////////////
console.log('Save Service Category Response:', response);
///////////////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
Backend.displayNotification(EALang['service_category_saved']);
@ -693,10 +666,6 @@ CategoriesHelper.prototype.delete = function(id) {
};
$.post(postUrl, postData, function(response) {
////////////////////////////////////////////////////
console.log('Delete category response:', response);
////////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
Backend.displayNotification(EALang['service_category_deleted']);
@ -739,7 +708,6 @@ CategoriesHelper.prototype.validate = function(category) {
return true;
} catch(exc) {
console.log('Category Record Validation Exc:', exc);
return false;
}
};

View file

@ -172,9 +172,6 @@ var BackendSettings = {
$('.save-settings').click(function() {
var settings = BackendSettings.settings.get();
BackendSettings.settings.save(settings);
//////////////////////////////////////////////
//console.log('Settings To Save: ', settings);
//////////////////////////////////////////////
});
/**
@ -196,9 +193,6 @@ var BackendSettings = {
};
$.post(postUrl, postData, function(response) {
///////////////////////////////////////////////////////
//console.log('Validate Username Response:', response);
///////////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
if (response == false) {
$input.css('border', '2px solid red');
@ -234,10 +228,6 @@ SystemSettings.prototype.save = function(settings) {
};
$.post(postUrl, postData, function(response) {
///////////////////////////////////////////////////////////
console.log('Save General Settings Response:', response);
///////////////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
Backend.displayNotification(EALang['settings_saved']);
@ -386,10 +376,6 @@ UserSettings.prototype.save = function(settings) {
};
$.post(postUrl, postData, function(response) {
//////////////////////////////////////////////////////////
console.log('Save User Settings Response: ', response);
//////////////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
Backend.displayNotification(EALang['settings_saved']);

View file

@ -133,10 +133,6 @@ var BackendUsers = {
'key': ''
};
$.post(postUrl, postData, function(response) {
//////////////////////////////////////////////////////////
//console.log('Get all db providers response:', response);
//////////////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
GlobalVariables.providers = response;
@ -194,9 +190,6 @@ var BackendUsers = {
};
$.post(postUrl, postData, function(response) {
///////////////////////////////////////////////////////
console.log('Validate Username Response:', response);
///////////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
if (response == false) {
$input.css('border', '2px solid red');

View file

@ -176,10 +176,6 @@ AdminsHelper.prototype.bindEventHandlers = function() {
* then the update operation is going to be executed.
*/
AdminsHelper.prototype.save = function(admin) {
////////////////////////////////////////////
//console.log('Admin data to save:', admin);
////////////////////////////////////////////
var postUrl = GlobalVariables.baseUrl + '/index.php/backend_api/ajax_save_admin';
var postData = {
'csrfToken': GlobalVariables.csrfToken,
@ -187,9 +183,6 @@ AdminsHelper.prototype.save = function(admin) {
};
$.post(postUrl, postData, function(response) {
////////////////////////////////////////////////
//console.log('Save Admin Response:', response);
////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
Backend.displayNotification(EALang['admin_saved']);
BackendUsers.helper.resetForm();
@ -211,9 +204,6 @@ AdminsHelper.prototype.delete = function(id) {
};
$.post(postUrl, postData, function(response) {
//////////////////////////////////////////////////
//console.log('Delete admin response:', response);
//////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
Backend.displayNotification(EALang['admin_deleted']);
BackendUsers.helper.resetForm();
@ -342,10 +332,6 @@ AdminsHelper.prototype.filter = function(key, selectId, display) {
};
$.post(postUrl, postData, function(response) {
///////////////////////////////////////////////////
//console.log('Filter admins response:', response);
///////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
BackendUsers.helper.filterResults = response;

View file

@ -227,10 +227,6 @@ ProvidersHelper.prototype.bindEventHandlers = function() {
* then the update operation is going to be executed.
*/
ProvidersHelper.prototype.save = function(provider) {
//////////////////////////////////////////////////
//console.log('Provider data to save:', provider);
//////////////////////////////////////////////////
var postUrl = GlobalVariables.baseUrl + '/index.php/backend_api/ajax_save_provider';
var postData = {
'csrfToken': GlobalVariables.csrfToken,
@ -238,9 +234,6 @@ ProvidersHelper.prototype.save = function(provider) {
};
$.post(postUrl, postData, function(response) {
///////////////////////////////////////////////////
//console.log('Save Provider Response:', response);
///////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
Backend.displayNotification(EALang['provider_saved']);
BackendUsers.helper.resetForm();
@ -262,9 +255,6 @@ ProvidersHelper.prototype.delete = function(id) {
};
$.post(postUrl, postData, function(response) {
/////////////////////////////////////////////////////
//console.log('Delete provider response:', response);
/////////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
Backend.displayNotification(EALang['provider_deleted']);
BackendUsers.helper.resetForm();
@ -418,10 +408,6 @@ ProvidersHelper.prototype.filter = function(key, selectId, display) {
};
$.post(postUrl, postData, function(response) {
//////////////////////////////////////////////////////
//console.log('Filter providers response:', response);
//////////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
BackendUsers.helper.filterResults = response;

View file

@ -187,20 +187,13 @@ SecretariesHelper.prototype.bindEventHandlers = function() {
* then the update operation is going to be executed.
*/
SecretariesHelper.prototype.save = function(secretary) {
////////////////////////////////////////////////////
//console.log('Secretary data to save:', secretary);
////////////////////////////////////////////////////
var postUrl = GlobalVariables.baseUrl + '/index.php/backend_api/ajax_save_secretary';
var postData = {
'csrfToken': GlobalVariables.csrfToken,
'secretary': JSON.stringify(secretary)
};
var postUrl = GlobalVariables.baseUrl + '/index.php/backend_api/ajax_save_secretary',
postData = {
'csrfToken': GlobalVariables.csrfToken,
'secretary': JSON.stringify(secretary)
};
$.post(postUrl, postData, function(response) {
////////////////////////////////////////////////////
//console.log('Save Secretary Response:', response);
////////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
Backend.displayNotification(EALang['secretary_saved']);
BackendUsers.helper.resetForm();
@ -215,16 +208,13 @@ SecretariesHelper.prototype.save = function(secretary) {
* @param {int} id Record id to be deleted.
*/
SecretariesHelper.prototype.delete = function(id) {
var postUrl = GlobalVariables.baseUrl + '/index.php/backend_api/ajax_delete_secretary';
var postData = {
'csrfToken': GlobalVariables.csrfToken,
'secretary_id': id
};
var postUrl = GlobalVariables.baseUrl + '/index.php/backend_api/ajax_delete_secretary',
postData = {
'csrfToken': GlobalVariables.csrfToken,
'secretary_id': id
};
$.post(postUrl, postData, function(response) {
//////////////////////////////////////////////////////
//console.log('Delete secretary response:', response);
//////////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
Backend.displayNotification(EALang['secretary_deleted']);
BackendUsers.helper.resetForm();
@ -363,10 +353,6 @@ SecretariesHelper.prototype.filter = function(key, selectId, display) {
};
$.post(postUrl, postData, function(response) {
////////////////////////////////////////////////////////
//console.log('Filter secretaries response:', response);
////////////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
BackendUsers.helper.filterResults = response;

View file

@ -327,10 +327,6 @@ var FrontendBook = {
};
$.post(postUrl, postData, function(response) {
///////////////////////////////////////////////////////////////
console.log('Get Available Hours JSON Response:', response);
///////////////////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
// The response contains the available hours for the selected provider and
@ -570,7 +566,6 @@ var FrontendBook = {
return true;
} catch(exc) {
console.log(exc); // log exception
return false;
}
},

View file

@ -35,10 +35,6 @@ $(document).ready(function() {
*/
function handleAuthResult(authResult) {
try {
///////////////////////////////////////////////////////////
console.log('Google Authorization Result: ', authResult);
///////////////////////////////////////////////////////////
if (authResult.error) {
throw 'Could not authorize user.';
}
@ -81,10 +77,6 @@ $(document).ready(function() {
});
request.execute(function(response) {
/////////////////////////////////////////////////
console.log('Google API Response:', response);
/////////////////////////////////////////////////
if (!response.error) {
$('#success-frame').append(
'<br><br>' +
@ -116,7 +108,6 @@ $(document).ready(function() {
'<pre>' + exc + '</pre>' +
'</p>' +
'</div>');
console.log('Add To Google Calendar Exception', exc);
}
}
});

View file

@ -325,10 +325,6 @@ var GeneralFunctions = {
'language': $(this).attr('data-language'),
};
$.post(postUrl, postData, function(response) {
////////////////////////////////////////////////////
console.log('Change Language Response', response);
////////////////////////////////////////////////////
if (!GeneralFunctions.handleAjaxExceptions(response)) return;
document.location.reload(true);
@ -349,8 +345,6 @@ var GeneralFunctions = {
message: 'AJAX Error: ' + errorThrown
}
];
console.log('AJAX Failure Handler:', jqxhr, textStatus, errorThrown);
GeneralFunctions.displayMessageBox(GeneralFunctions.EXCEPTIONS_TITLE,
GeneralFunctions.EXCEPTIONS_MESSAGE);
$('#message_box').append(GeneralFunctions.exceptionsToHtml(exceptions));