mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-09-24 10:27:46 +02:00
Declare a redirect to __REFRESH__ as autorefresh
to preserve scroll position when a modal is closed.
This commit is contained in:
parent
890ca9b1f8
commit
a0190dbf44
@ -498,7 +498,8 @@
|
||||
processRedirectHeader: function(req) {
|
||||
var icinga = this.icinga,
|
||||
$redirectTarget = req.$redirectTarget,
|
||||
redirect = req.getResponseHeader('X-Icinga-Redirect');
|
||||
redirect = req.getResponseHeader('X-Icinga-Redirect'),
|
||||
autorefresh = false;
|
||||
|
||||
if (! redirect) {
|
||||
return false;
|
||||
@ -599,6 +600,8 @@
|
||||
icinga.logger.error('Unable to refresh. Not a primary column: ', req.$redirectTarget);
|
||||
return false;
|
||||
}
|
||||
|
||||
autorefresh = true;
|
||||
}
|
||||
|
||||
var useHttp = req.getResponseHeader('X-Icinga-Redirect-Http');
|
||||
@ -607,7 +610,7 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
this.redirectToUrl(redirect, $redirectTarget, req);
|
||||
this.redirectToUrl(redirect, $redirectTarget, req, autorefresh);
|
||||
return true;
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user