diff --git a/public/js/icinga/loader.js b/public/js/icinga/loader.js index 822903a01..2c2cea5c4 100644 --- a/public/js/icinga/loader.js +++ b/public/js/icinga/loader.js @@ -255,10 +255,22 @@ active = $('[href].active', req.$target).attr('href'); } + var notifications = req.getResponseHeader('X-Icinga-Notification'); + if (notifications) { + var parts = notifications.split(' '); + this.createNotice( + parts.shift(), + parts.join(' ') + ); + } + // var target = req.getResponseHeader('X-Icinga-Container'); var newBody = false; if (target) { + if (target === 'ignore') { + return; + } req.$target = $('#' + target); newBody = true; } @@ -288,15 +300,6 @@ this.icinga.ui.setWindowId(windowId); } - var notifications = req.getResponseHeader('X-Icinga-Notification'); - if (notifications) { - var parts = notifications.split(' '); - this.createNotice( - parts.shift(), - parts.join(' ') - ); - } - // Remove 'impact' class if there was such if (req.$target.hasClass('impact')) { req.$target.removeClass('impact'); @@ -438,9 +441,11 @@ if (persist) { c += ' persist'; } - return $( + var $notice = $( '
  • ' + message + '
  • ' ).appendTo($('#notifications')); + this.icinga.ui.fixControls(); + return $notice; }, /**