Let some env variables survive reset(); don't show taskbar and top line in framed error pages (#1488938)

pull/88/head
Thomas Bruederli 12 years ago
parent 0016cde2fe
commit df22967745

@ -80,6 +80,8 @@ class rcmail_output_html extends rcmail_output
if (!empty($_REQUEST['_extwin'])) if (!empty($_REQUEST['_extwin']))
$this->set_env('extwin', 1); $this->set_env('extwin', 1);
if ($this->framed || !empty($_REQUEST['_framed']))
$this->set_env('framed', 1);
// add common javascripts // add common javascripts
$this->add_script('var '.self::JS_OBJECT_NAME.' = new rcube_webmail();', 'head_top'); $this->add_script('var '.self::JS_OBJECT_NAME.' = new rcube_webmail();', 'head_top');
@ -308,8 +310,12 @@ class rcmail_output_html extends rcmail_output
*/ */
public function reset() public function reset()
{ {
$env = array_intersect_key($this->env, array('extwin'=>1, 'framed'=>1));
parent::reset(); parent::reset();
$this->js_env = array();
// let some env variables survive
$this->env = $this->js_env = $env;
$this->js_labels = array(); $this->js_labels = array();
$this->js_commands = array(); $this->js_commands = array();
$this->script_files = array(); $this->script_files = array();

@ -10,16 +10,16 @@
<roundcube:container name="topline-center" id="topline-center" /> <roundcube:container name="topline-center" id="topline-center" />
<div class="topright"> <div class="topright">
<roundcube:container name="topline-right" id="topline-right" /> <roundcube:container name="topline-right" id="topline-right" />
<roundcube:if condition="!env:extwin" /> <roundcube:if condition="!env:extwin &amp;&amp; !env:framed" />
<span class="username"><roundcube:object name="username" /></span> <span class="username"><roundcube:object name="username" /></span>
<roundcube:button command="logout" label="logout" class="button-logout" /> <roundcube:button command="logout" label="logout" class="button-logout" />
<roundcube:else /> <roundcube:elseif condition="env:extwin" />
<roundcube:button command="close" label="close" class="closelink" /> <roundcube:button command="close" label="close" class="closelink" />
<roundcube:endif /> <roundcube:endif />
</div> </div>
</div> </div>
<roundcube:if condition="!env:extwin" /> <roundcube:if condition="!env:extwin &amp;&amp; !env:framed" />
<div id="topnav"> <div id="topnav">
<div id="taskbar" class="topright"> <div id="taskbar" class="topright">
<roundcube:button command="mail" label="mail" class="button-mail" classSel="button-mail button-selected" innerClass="button-inner" /> <roundcube:button command="mail" label="mail" class="button-mail" classSel="button-mail button-selected" innerClass="button-inner" />

@ -1246,6 +1246,10 @@ body.iframe {
margin: 38px 0 10px 0; margin: 38px 0 10px 0;
} }
body.iframe.error {
background: #ededed;
}
body.iframe.floatingbuttons { body.iframe.floatingbuttons {
margin-bottom: 40px; margin-bottom: 40px;
} }

@ -4,9 +4,12 @@
<title><roundcube:object name="pagetitle" /></title> <title><roundcube:object name="pagetitle" /></title>
<roundcube:include file="/includes/links.html" /> <roundcube:include file="/includes/links.html" />
</head> </head>
<body> <roundcube:if condition="!env:framed" />
<body class="error">
<roundcube:include file="/includes/header.html" /> <roundcube:include file="/includes/header.html" />
<roundcube:else />
<body class="error iframe">
<roundcube:endif />
<div class="uibox centerbox errorbox"> <div class="uibox centerbox errorbox">
$__page_content $__page_content

Loading…
Cancel
Save