Remove timeout before closing the extra periods modal on success.

This commit is contained in:
Sébastien 2020-05-04 21:19:02 +02:00
parent 07276d46a6
commit 9905c942ac

View file

@ -59,13 +59,9 @@ window.BackendCalendarExtraPeriodsModal = window.BackendCalendarExtraPeriodsModa
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.extra_period_saved);
.text(EALang.extra_period_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');
@ -85,7 +81,6 @@ window.BackendCalendarExtraPeriodsModal = window.BackendCalendarExtraPeriodsModa
GlobalVariables.availableProviders[providerIdx] = provider; GlobalVariables.availableProviders[providerIdx] = provider;
$('#select-filter-item').trigger('change'); $('#select-filter-item').trigger('change');
}, 2000);
}; };
var errorCallback = function (jqXHR, textStatus, errorThrown) { var errorCallback = function (jqXHR, textStatus, errorThrown) {