Remove timeout when appointment modal save/update action is successfull.
This commit is contained in:
parent
b834869fd3
commit
b7c54af0d0
2 changed files with 10 additions and 19 deletions
|
@ -99,16 +99,12 @@ window.BackendCalendarAppointmentsModal = window.BackendCalendarAppointmentsModa
|
||||||
// Define success callback.
|
// Define success callback.
|
||||||
var successCallback = function (response) {
|
var successCallback = function (response) {
|
||||||
// Display success message to the user.
|
// Display success message to the user.
|
||||||
$dialog.find('.modal-message').text(EALang.appointment_saved);
|
Backend.displayNotification(EALang.appointment_saved);
|
||||||
$dialog.find('.modal-message').addClass('alert-success').removeClass('alert-danger hidden');
|
|
||||||
$dialog.find('.modal-body').scrollTop(0);
|
|
||||||
|
|
||||||
// Close the modal dialog and refresh the calendar appointments after one second.
|
// Close the modal dialog and refresh the calendar appointments.
|
||||||
setTimeout(function () {
|
$dialog.find('.alert').addClass('hidden');
|
||||||
$dialog.find('.alert').addClass('hidden');
|
$dialog.modal('hide');
|
||||||
$dialog.modal('hide');
|
$('#select-filter-item').trigger('change');
|
||||||
$('#select-filter-item').trigger('change');
|
|
||||||
}, 2000);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Define error callback.
|
// Define error callback.
|
||||||
|
|
|
@ -60,17 +60,12 @@ window.BackendCalendarUnavailabilitiesModal = window.BackendCalendarUnavailabili
|
||||||
|
|
||||||
var successCallback = function (response) {
|
var successCallback = function (response) {
|
||||||
// Display success message to the user.
|
// Display success message to the user.
|
||||||
$dialog.find('.modal-message')
|
Backend.displayNotification(EALang.unavailable_saved);
|
||||||
.text(EALang.unavailable_saved)
|
|
||||||
.addClass('alert-success')
|
|
||||||
.removeClass('alert-danger hidden');
|
|
||||||
|
|
||||||
// Close the modal dialog and refresh the calendar appointments after one second.
|
// Close the modal dialog and refresh the calendar appointments.
|
||||||
setTimeout(function () {
|
$dialog.find('.alert').addClass('hidden');
|
||||||
$dialog.find('.alert').addClass('hidden');
|
$dialog.modal('hide');
|
||||||
$dialog.modal('hide');
|
$('#select-filter-item').trigger('change');
|
||||||
$('#select-filter-item').trigger('change');
|
|
||||||
}, 2000);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var errorCallback = function (jqXHR, textStatus, errorThrown) {
|
var errorCallback = function (jqXHR, textStatus, errorThrown) {
|
||||||
|
|
Loading…
Reference in a new issue