mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
js: Only add .impact
to a container's content
This commit is contained in:
parent
62cae50f1e
commit
97f8767970
@ -216,8 +216,9 @@
|
|||||||
req.progressTimer = progressTimer;
|
req.progressTimer = progressTimer;
|
||||||
|
|
||||||
if ($autoSubmittedBy) {
|
if ($autoSubmittedBy) {
|
||||||
if ($autoSubmittedBy.closest('.controls').length) {
|
const $closestControls = $autoSubmittedBy.closest('.controls');
|
||||||
$('.content', req.$target).addClass('impact');
|
if ($closestControls.length && $closestControls[0].parentNode === req.$target[0]) {
|
||||||
|
$(':scope > .content', req.$target).addClass('impact');
|
||||||
} else {
|
} else {
|
||||||
req.$target.addClass('impact');
|
req.$target.addClass('impact');
|
||||||
}
|
}
|
||||||
@ -965,7 +966,7 @@
|
|||||||
if (req.$target.hasClass('impact')) {
|
if (req.$target.hasClass('impact')) {
|
||||||
req.$target.removeClass('impact');
|
req.$target.removeClass('impact');
|
||||||
} else {
|
} else {
|
||||||
var $impact = req.$target.find('.impact').first();
|
const $impact = req.$target.find(':scope > .content.impact').first();
|
||||||
if ($impact.length) {
|
if ($impact.length) {
|
||||||
$impact.removeClass('impact');
|
$impact.removeClass('impact');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user