* eMail: preview now requires user action (click on)

This commit is contained in:
Klaus Leithoff 2011-01-26 12:47:18 +00:00
parent eca030ad6f
commit 9170842d52

View File

@ -439,12 +439,14 @@ class uiwidgets
' - '.bofelamimail::_strtotime($header['date'],($GLOBALS['egw_info']['user']['preferences']['common']['timeformat']==12?'h:i:s a':'H:i:s')));
$this->t->set_var('size', $this->show_readable_size($header['size']));
if ($firstuid === null)
// selecting the first message by default for preview
if ($firstuid === null) // only use preview if there is a message selected, so selecting the first message by default is not used anymore
{
//_debug_array($header);
$firstuid = $header['uid'];
$firstheader = $header;
//$firstuid = $selecteduid = $header['uid'];
//$firstheader = $header;
}
// preview the message with the requested (messageToBePreviewed) uid
if ($messageToBePreviewed>0
&& $GLOBALS['egw_info']['user']['preferences']['felamimail']['PreViewFrameHeight']>0
&& $messageToBePreviewed == $header['uid'])
@ -537,8 +539,36 @@ class uiwidgets
break;
}
}
$IFRAMEBody = $this->updateMessagePreview($firstheader,$_folderType,$_folderName);
if ($firstheader &&
$GLOBALS['egw_info']['user']['preferences']['felamimail']['PreViewFrameHeight']>0 &&
($_folderType==0 || $_folderType==1)) // only if not drafts or template folder
{
$IFRAMEBody = $this->updateMessagePreview($firstheader,$_folderType,$_folderName);
}
else
{
if ($GLOBALS['egw_info']['user']['preferences']['felamimail']['PreViewFrameHeight']>0)
{
$IFRAMEBody = "<TABLE BORDER=\"1\" rules=\"rows\" style=\"table-layout:fixed;width:100%;\">
<TR class=\"th\" style=\"width:100%;\">
<TD nowrap valign=\"top\">
".'<b><br> '.
"<center><font color='red'>".(!($_folderType == 2 || $_folderType == 3)?lang("Select a message to switch on its preview (click on subject)"):lang("Preview disabled for Folder: ").$_folderName)."</font></center><br>
</b>"."
</TD>
</TR>
<TR>
<TD nowrap id=\"tdmessageIFRAME\" valign=\"top\" height=\"".$GLOBALS['egw_info']['user']['preferences']['felamimail']['PreViewFrameHeight']."\">
&nbsp;
</TD>
</TR>
</TABLE>";
}
else
{
$IFRAMEBody = '';
}
}
$this->t->set_var('IFrameForPreview',$IFRAMEBody);
$this->t->set_var('messagelist_height',($GLOBALS['egw_info']['user']['preferences']['felamimail']['PreViewFrameHeight']>0 ? ($GLOBALS['egw_info']['user']['preferences']['felamimail']['PreViewFrameHeight']).'px':'auto'));