monitoring: Re-focus check now and alike

This commit is contained in:
Eric Lippmann 2016-01-22 13:33:59 +01:00
parent bc187d91c5
commit 4c4e8e4ac2
2 changed files with 6 additions and 5 deletions

View File

@ -387,7 +387,7 @@
}
var req = icinga.loader.loadUrl(url, $target, data, method);
req.forceFocus = autosubmit ? $(event.currentTarget) : null;
req.forceFocus = autosubmit ? $(event.currentTarget) : $button.length ? $button : null;
req.progressTimer = progressTimer;
event.stopPropagation();

View File

@ -331,7 +331,7 @@
}
}
this.redirectToUrl(redirect, req.$target, req.url, req.getResponseHeader('X-Icinga-Rerender-Layout'));
this.redirectToUrl(redirect, req.$target, req.url, req.getResponseHeader('X-Icinga-Rerender-Layout'), req.forceFocus);
return true;
},
@ -340,10 +340,10 @@
*
* @param {string} url
* @param {object} $target
* @param {string] origin
* @param {string} origin
* @param {boolean} rerenderLayout
*/
redirectToUrl: function (url, $target, origin, rerenderLayout) {
redirectToUrl: function (url, $target, origin, rerenderLayout, forceFocus) {
var icinga = this.icinga;
if (typeof rerenderLayout === 'undefined') {
@ -392,7 +392,8 @@
}
}
this.loadUrl(url, $target);
var req = this.loadUrl(url, $target);
req.forceFocus = url === origin ? forceFocus : null;
}
}
},