monitoring: Re-focus check now and alike
This commit is contained in:
parent
bc187d91c5
commit
4c4e8e4ac2
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue