mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-09-25 10:57:40 +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) {
|
processRedirectHeader: function(req) {
|
||||||
var icinga = this.icinga,
|
var icinga = this.icinga,
|
||||||
$redirectTarget = req.$redirectTarget,
|
$redirectTarget = req.$redirectTarget,
|
||||||
redirect = req.getResponseHeader('X-Icinga-Redirect');
|
redirect = req.getResponseHeader('X-Icinga-Redirect'),
|
||||||
|
autorefresh = false;
|
||||||
|
|
||||||
if (! redirect) {
|
if (! redirect) {
|
||||||
return false;
|
return false;
|
||||||
@ -599,6 +600,8 @@
|
|||||||
icinga.logger.error('Unable to refresh. Not a primary column: ', req.$redirectTarget);
|
icinga.logger.error('Unable to refresh. Not a primary column: ', req.$redirectTarget);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
autorefresh = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var useHttp = req.getResponseHeader('X-Icinga-Redirect-Http');
|
var useHttp = req.getResponseHeader('X-Icinga-Redirect-Http');
|
||||||
@ -607,7 +610,7 @@
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.redirectToUrl(redirect, $redirectTarget, req);
|
this.redirectToUrl(redirect, $redirectTarget, req, autorefresh);
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user