From e4d802b7095e1fc7bd77daa0bd60d921d4904744 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 25 Jan 2019 10:44:46 +0100 Subject: [PATCH] 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. --- public/js/module.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/public/js/module.js b/public/js/module.js index 8485e48..e7c6e1c 100644 --- a/public/js/module.js +++ b/public/js/module.js @@ -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'),