js/loader: reload CSS BEFORE redirecting

This commit is contained in:
Thomas Gelf 2014-06-22 20:01:10 +02:00
parent 41b8b8cf31
commit aded901aa5
1 changed files with 5 additions and 5 deletions

View File

@ -287,6 +287,11 @@
); );
this.processNotificationHeader(req); this.processNotificationHeader(req);
var cssreload = req.getResponseHeader('X-Icinga-Reload-Css');
if (cssreload) {
this.icinga.ui.reloadCss();
}
var redirect = req.getResponseHeader('X-Icinga-Redirect'); var redirect = req.getResponseHeader('X-Icinga-Redirect');
if (this.processRedirectHeader(req)) return; if (this.processRedirectHeader(req)) return;
@ -368,11 +373,6 @@
} }
req.$target.attr('class', classes.join(' ')); req.$target.attr('class', classes.join(' '));
var cssreload = req.getResponseHeader('X-Icinga-CssReload');
if (cssreload) {
this.icinga.ui.reloadCss();
}
var title = req.getResponseHeader('X-Icinga-Title'); var title = req.getResponseHeader('X-Icinga-Title');
if (title && ! req.autorefresh && req.$target.closest('.dashboard').length === 0) { if (title && ! req.autorefresh && req.$target.closest('.dashboard').length === 0) {
this.icinga.ui.setTitle(decodeURIComponent(title)); this.icinga.ui.setTitle(decodeURIComponent(title));