js: Prevent the user from issuing further changes while a request is running

Icinga Web 2 has the peculiarity to abort previous requests which are directed
to the same container. In this case, this may lead to inconsistencies with the
ui and the backend.
This commit is contained in:
Johannes Meyer 2019-01-25 10:44:46 +01:00
parent b3a5c34c45
commit e4d802b709

View file

@ -121,7 +121,12 @@
if (evt.oldIndex !== evt.newIndex || !$target.is($source)) {
var $root = $target.closest('.content > ul.bp');
$root.addClass('progress');
$root.addClass('progress')
.find('ul.bp')
.add($root)
.each(function() {
$(this).data('sortable').option('disabled', true);
});
var data = {
csrfToken: $target.data('csrfToken'),