Reversed most changes made for egw-stylite #8295, commited changes proposed by Ingo Ratsdorf in egroupware.org #2834, probably fixes egroupware.org #2831

This commit is contained in:
Andreas Stöckel 2011-02-04 14:28:12 +00:00
parent 3e00917ddb
commit 0d88ac8799
4 changed files with 7 additions and 45 deletions

View File

@ -340,19 +340,7 @@ class egw extends egw_minimal
// do NOT redirect, but set top.location, as this works in framed template too
$redirect = $GLOBALS['egw_info']['server']['webserver_url'].$redirect;
echo "<html>\n<head>\n<script type='text/javascript'>
if (typeof window.frameElement != 'undefined' &&
window.frameElement &&
typeof window.frameElement.egw_app != 'undefined' &&
typeof window.frameElement.egw_app.isRemote != 'undefined')
{
window.location='$redirect';
}
else
{
top.location='$redirect';
}
</script>\n</head>\n";
echo "<html>\n<head>\n<script type='text/javascript'>top.location='$redirect';</script>\n</head>\n";
exit;
}
}

View File

@ -220,7 +220,9 @@ egw_json_request.prototype._assembleAjaxUrl = function(_menuaction)
var webserver_url = egw_topWindow().egw_webserverUrl;
// Check whether the webserver_url is really set
if (!webserver_url)
// Don't check for !webserver_url as it might be empty.
// Thank you to Ingo Ratsdorf for reporting this.
if (typeof webserver_url == "undefined")
{
throw "Internal JS error, top window not found, webserver url could not be retrieved.";
}

View File

@ -120,19 +120,7 @@ function egw_appWindow(_app)
*/
function egw_getApp(_name)
{
var napp = null;
if (typeof window.frameElement != "undefined" &&
window.frameElement != null &&
typeof window.frameElement.egw_app != "undefined")
{
napp = window.frameElement.egw_app;
}
else
{
napp = window.parent.framework.getApplicationByName(_name);
}
return napp;
return window.parent.framework.getApplicationByName(_name);
}
/**

View File

@ -6,7 +6,7 @@
<div id="centerBox">
<div id="loginScreenMessage">{lang_message}</div>
<div id="loginCdMessage">{cd}</div>
<form name="login_form" id="login_form" method="post" action="{login_url}">
<form name="login_form" method="post" action="{login_url}">
<table class="divLoginbox divSideboxEntry" cellspacing="0" cellpadding="2" border="0" align="center">
<tr class="divLoginboxHeader">
<td colspan="3">{website_title}</td>
@ -63,21 +63,5 @@
<!-- END registration -->
</table>
</form>
<script type="text/javascript">
//Check whether the loginpage is displayed from within the jdots framework
//if yes, supress the "cd=yes" being appended to the page loaded
if (typeof window.frameElement != 'undefined' &&
window.frameElement &&
typeof window.frameElement.egw_app != 'undefined' &&
typeof window.frameElement.egw_app.isRemote != 'undefined' &&
window.frameElement.egw_app.isRemote())
{
loginForm = document.getElementById('login_form');
if (loginForm && loginForm.action.indexOf('phpgw_forward') > 0)
{
loginForm.action += '&suppress_cd=1';
}
}
</script>
</div>
</div>