js: Also handle spinner elements which are not direct descendants of an element

This commit is contained in:
Johannes Meyer 2019-07-17 10:25:43 +02:00
parent 115bb80c6a
commit d0eca387ee
1 changed files with 2 additions and 2 deletions
public/js/icinga

View File

@ -348,8 +348,8 @@
}
// Show a spinner depending on how the form is being submitted
if (autosubmit && typeof $el !== 'undefined' && $el.next().hasClass('spinner')) {
$el.next().addClass('active');
if (autosubmit && typeof $el !== 'undefined' && $el.siblings('.spinner').length) {
$el.siblings('.spinner').first().addClass('active');
} else if ($button.length && $button.is('button') && $button.hasClass('animated')) {
$button.addClass('active');
} else if ($button.length && $button.attr('data-progress-label')) {