modal.js: Set modal title from resp header on autosubmit
This commit is contained in:
parent
4cff1feb8f
commit
2be192679b
|
@ -109,6 +109,11 @@
|
||||||
req.addToHistory = false;
|
req.addToHistory = false;
|
||||||
req.$redirectTarget = $modal.data('redirectTarget');
|
req.$redirectTarget = $modal.data('redirectTarget');
|
||||||
req.done(function (data, textStatus, req) {
|
req.done(function (data, textStatus, req) {
|
||||||
|
var title = req.getResponseHeader('X-Icinga-Title');
|
||||||
|
if (!! title) {
|
||||||
|
_this.setTitle($modal, decodeURIComponent(title).replace(/\s::\s.*/, ''));
|
||||||
|
}
|
||||||
|
|
||||||
if (req.getResponseHeader('X-Icinga-Redirect')) {
|
if (req.getResponseHeader('X-Icinga-Redirect')) {
|
||||||
_this.hide($modal);
|
_this.hide($modal);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue