fix redirects in a popup and new egw_exception_redirect to be used in hooks/callbacks like for addressbook.edit to redirect to a different location

This commit is contained in:
Ralf Becker
2014-10-15 14:55:08 +00:00
parent 628b1369f7
commit 424b4c451c
5 changed files with 64 additions and 7 deletions

View File

@@ -406,6 +406,12 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd) {
{
egw_topWindow().location.href = res.data.url;
}
// json request was originating from a different window --> redirect that one
else if(this.DOMContainer && this.DOMContainer.ownerDocument.defaultView != window)
{
this.DOMContainer.ownerDocument.location.href = res.data.url;
}
// main window, open url in respective tab
else
{
egw_appWindowOpen(res.data.app, res.data.url);