mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-09 00:14:57 +02:00
track top EGroupware window in egw object to be used as egw.top instead of window.top, which can throw a security exception
This commit is contained in:
@ -149,17 +149,7 @@ function egw_insertJS(_html)
|
||||
*/
|
||||
function egw_topWindow()
|
||||
{
|
||||
if (typeof window.parent != "undefined" && typeof window.parent.top != "undefined")
|
||||
{
|
||||
return window.parent.top;
|
||||
}
|
||||
|
||||
if (typeof window.opener != "undefined" && typeof window.opener.top != "undefined")
|
||||
{
|
||||
return window.opener.top;
|
||||
}
|
||||
|
||||
return window.top;
|
||||
return egw.top;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -288,14 +278,15 @@ window.egw_getFramework = function()
|
||||
{
|
||||
return framework;
|
||||
}
|
||||
else if (typeof window.parent.egw_getFramework != "undefined" && window != window.parent)
|
||||
{
|
||||
return window.parent.egw_getFramework();
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
try {
|
||||
if (typeof window.parent.egw_getFramework != "undefined" && window != window.parent)
|
||||
{
|
||||
return window.parent.egw_getFramework();
|
||||
}
|
||||
}
|
||||
catch (e) {}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user