mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-22 07:52:29 +03:00
Replaced the AJAX failure callback function
This commit is contained in:
parent
531732c9a1
commit
6290b85b82
1 changed files with 2 additions and 10 deletions
|
@ -58,7 +58,7 @@ window.BackendCalendarUnavailabilitiesModal = window.BackendCalendarUnavailabili
|
|||
unavailable.id = $dialog.find('#unavailable-id').val();
|
||||
}
|
||||
|
||||
var successCallback = function (response) {
|
||||
var successCallback = function () {
|
||||
// Display success message to the user.
|
||||
Backend.displayNotification(EALang.unavailable_saved);
|
||||
|
||||
|
@ -68,15 +68,7 @@ window.BackendCalendarUnavailabilitiesModal = window.BackendCalendarUnavailabili
|
|||
$('#select-filter-item').trigger('change');
|
||||
};
|
||||
|
||||
var errorCallback = function (jqXHR, textStatus, errorThrown) {
|
||||
GeneralFunctions.displayMessageBox('Communication Error', 'Unfortunately ' +
|
||||
'the operation could not complete due to server communication errors.');
|
||||
|
||||
$dialog.find('.modal-message').txt(EALang.service_communication_error);
|
||||
$dialog.find('.modal-message').addClass('alert-danger').removeClass('hidden');
|
||||
};
|
||||
|
||||
BackendCalendarApi.saveUnavailable(unavailable, successCallback, errorCallback);
|
||||
BackendCalendarApi.saveUnavailable(unavailable, successCallback, GeneralFunctions.ajaxFailureHandler);
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue