mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 15:54:03 +02:00
js: Fix that the fallback spinner is not utilized for auto submits
refs #8369
This commit is contained in:
parent
46cd47b73c
commit
d9855d8273
@ -336,8 +336,7 @@
|
|||||||
// Show a spinner depending on how the form is being submitted
|
// Show a spinner depending on how the form is being submitted
|
||||||
if (autosubmit && typeof $el !== 'undefined' && $el.next().hasClass('autosubmit-warning')) {
|
if (autosubmit && typeof $el !== 'undefined' && $el.next().hasClass('autosubmit-warning')) {
|
||||||
$el.next().addClass('spinning');
|
$el.next().addClass('spinning');
|
||||||
} else if ($button.length) {
|
} else if ($button.length && $button.attr('data-progress-label')) {
|
||||||
if ($button.attr('data-progress-label')) {
|
|
||||||
var isInput = $button.is('input');
|
var isInput = $button.is('input');
|
||||||
if (isInput) {
|
if (isInput) {
|
||||||
$button.prop('value', $button.attr('data-progress-label') + '...');
|
$button.prop('value', $button.attr('data-progress-label') + '...');
|
||||||
@ -367,12 +366,15 @@
|
|||||||
$button.html(label);
|
$button.html(label);
|
||||||
}
|
}
|
||||||
}, null, 100);
|
}, null, 100);
|
||||||
} else if ($button.next().hasClass('spinner')) {
|
} else if ($button.length && $button.next().hasClass('spinner')) {
|
||||||
$('i', $button.next()).addClass('active');
|
$('i', $button.next()).addClass('active');
|
||||||
} else if ($form.attr('data-progress-element')) {
|
} else if ($form.attr('data-progress-element')) {
|
||||||
var $progressElement = $('#' + $form.attr('data-progress-element'));
|
var $progressElement = $('#' + $form.attr('data-progress-element'));
|
||||||
if ($progressElement.length) {
|
if ($progressElement.length) {
|
||||||
|
if ($progressElement.hasClass('spinner')) {
|
||||||
$('i', $progressElement).addClass('active');
|
$('i', $progressElement).addClass('active');
|
||||||
|
} else {
|
||||||
|
$('i.autosubmit-warning', $progressElement).addClass('spinning');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user