loader: Remove gray out on complete handler

A failure did not remove the impact class which colorize
the background gray.
This commit is contained in:
Marius Hein 2015-02-02 15:18:05 +01:00
parent 9d6906bd64
commit 67a426580d
1 changed files with 5 additions and 5 deletions

View File

@ -318,11 +318,6 @@
this.failureNotice = null;
}
// Remove 'impact' class if there was such
if (req.$target.hasClass('impact')) {
req.$target.removeClass('impact');
}
var url = req.url;
this.icinga.logger.debug(
'Got response for ', req.$target, ', URL was ' + url
@ -520,6 +515,11 @@
* Regardless of whether a request succeeded of failed, clean up
*/
onComplete: function (req, textStatus) {
// Remove 'impact' class if there was such
if (req.$target.hasClass('impact')) {
req.$target.removeClass('impact');
}
if (! req.autorefresh) {
// TODO: Hook for response/url?
var url = req.url;