Notifications do not disappear after autorefresh

This is not affected anymore because the errors goes directly
into the container. But this commit fixes the codes if someone
use the notifications in the loader. Also remove unused
variable this.exception.

fixes #6278
This commit is contained in:
Marius Hein 2015-01-30 15:25:03 +01:00
parent 6ec2ee753d
commit 7b8332ccd8
1 changed files with 9 additions and 8 deletions

View File

@ -24,8 +24,6 @@
this.failureNotice = null;
this.exception = null;
/**
* Pending requests
*/
@ -313,15 +311,12 @@
onResponse: function (data, textStatus, req) {
var self = this;
if (this.failureNotice !== null) {
this.failureNotice.remove();
if (! this.failureNotice.hasClass('fading-out')) {
this.failureNotice.remove();
}
this.failureNotice = null;
}
if (this.exception !== null) {
this.exception.remove();
this.exception = null;
}
// Remove 'impact' class if there was such
if (req.$target.hasClass('impact')) {
req.$target.removeClass('impact');
@ -646,7 +641,13 @@
var $notice = $(
'<li class="' + c + '">' + message + '</li>'
).appendTo($('#notifications'));
this.icinga.ui.fixControls();
if (!persist) {
this.icinga.ui.fadeNotificationsAway();
}
return $notice;
},