rather big commit to implement the message preview (3PaneView); You must update felamimail, as the version numer is increased and new hooks are introduced

This commit is contained in:
Klaus Leithoff 2009-12-11 13:15:17 +00:00
parent f86b13e4a6
commit a26aa408cb
13 changed files with 465 additions and 284 deletions

View File

@ -5,6 +5,7 @@
* http://www.phpgw.de *
* http://www.egroupware.org *
* Written by : Lars Kneschke [lkneschke@linux-at-work.de] *
* maintained by Klaus Leithoff *
* ------------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
@ -680,6 +681,29 @@
return $this->generateMessageList($this->sessionData['mailbox']);
}
function refreshMessagePreview($_messageID,$_folderType)
{
$this->bofelamimail->restoreSessionData();
$headerData = $this->bofelamimail->getHeaders(
$this->sessionData['mailbox'],
0,
0,
'',
'',
'',
$_messageID
);
$headerData = $headerData['header'][0];
$this->sessionData['previewMessage'] = $headerData['uid'];
$this->saveSessionData();
//error_log(print_r($headerData,true));
$response = new xajaxResponse();
$response->addScript("document.getElementById('messageCounter').innerHTML =MessageBuffer;");
$response->addAssign('spanMessagePreview', 'innerHTML', $this->uiwidgets->updateMessagePreview($headerData,$_folderType, $this->sessionData['mailbox']));
return $response->getXML();
}
function refreshMessageList()
{
return $this->generateMessageList($this->sessionData['mailbox']);

View File

@ -1907,7 +1907,7 @@
}
}
function getHeaders($_folderName, $_startMessage, $_numberOfMessages, $_sort, $_reverse, $_filter)
function getHeaders($_folderName, $_startMessage, $_numberOfMessages, $_sort, $_reverse, $_filter, $_thisUIDOnly=null)
{
$reverse = (bool)$_reverse;
// get the list of messages to fetch
@ -1916,33 +1916,39 @@
#print "<pre>";
#$this->icServer->setDebug(true);
$sortResult = $this->getSortedList($_folderName, $_sort, $_reverse, $_filter);
#$this->icServer->setDebug(false);
#print "</pre>";
// nothing found
if(!is_array($sortResult) || empty($sortResult)) {
$retValue = array();
$retValue['info']['total'] = 0;
$retValue['info']['first'] = 0;
$retValue['info']['last'] = 0;
return $retValue;
}
$total = count($sortResult);
#_debug_array($sortResult);
#_debug_array(array_slice($sortResult, -5, -2));
#error_log("REVERSE: $reverse");
if($reverse === true) {
$startMessage = $_startMessage-1;
if($startMessage > 0) {
$sortResult = array_slice($sortResult, -($_numberOfMessages+$startMessage), -$startMessage);
} else {
$sortResult = array_slice($sortResult, -($_numberOfMessages+($_startMessage-1)));
if ($_thisUIDOnly === null)
{
$sortResult = $this->getSortedList($_folderName, $_sort, $_reverse, $_filter);
#$this->icServer->setDebug(false);
#print "</pre>";
// nothing found
if(!is_array($sortResult) || empty($sortResult)) {
$retValue = array();
$retValue['info']['total'] = 0;
$retValue['info']['first'] = 0;
$retValue['info']['last'] = 0;
return $retValue;
}
$sortResult = array_reverse($sortResult);
} else {
$sortResult = array_slice($sortResult, $_startMessage-1, $_numberOfMessages);
$total = count($sortResult);
#_debug_array($sortResult);
#_debug_array(array_slice($sortResult, -5, -2));
#error_log("REVERSE: $reverse");
if($reverse === true) {
$startMessage = $_startMessage-1;
if($startMessage > 0) {
$sortResult = array_slice($sortResult, -($_numberOfMessages+$startMessage), -$startMessage);
} else {
$sortResult = array_slice($sortResult, -($_numberOfMessages+($_startMessage-1)));
}
$sortResult = array_reverse($sortResult);
} else {
$sortResult = array_slice($sortResult, $_startMessage-1, $_numberOfMessages);
}
}
else
{
$sortResult = (is_array($_thisUIDOnly) ? $_thisUIDOnly:(array)$_thisUIDOnly);
}
$queryString = implode(',', $sortResult);

View File

@ -13,6 +13,26 @@
*/
class felamimail_hooks
{
/**
* Hook called by link-class to include calendar in the appregistry of the linkage
*
* @param array/string $location location and other parameters (not used)
* @return array with method-names
*/
static function search_link($location)
{
return array(
'view' => array(
'menuaction' => 'felamimail.uidisplay.display',
),
'view_popup' => '850xegw_getWindowOuterHeight()',
'add' => array(
'menuaction' => 'felamimail.uicompose.compose',
),
'add_popup' => '850xegw_getWindowOuterHeight()',
);
}
/**
* Settings hook
*
@ -241,6 +261,14 @@ class felamimail_hooks
'admin' => False,
'default'=> 'felamimail',
),
'PreViewFrameHeight' => array(
'type' => 'input',
'label' => '3PaneView: If you want to see a preview of a mail by single clicking onto the subject, set the height for the message-list and the preview area here (300 seems to be a good working value). The preview will be displayed at the end of the message list on demand (click).',
'name' => 'PreViewFrameHeight',
'xmlrpc' => True,
'admin' => False,
'forced' => '-1',
),
'message_forwarding' => array(
'type' => 'select',
'label' => 'how to forward messages',

View File

@ -5,6 +5,7 @@
* http://www.phpgw.de *
* http://www.egroupware.org *
* Written by : Lars Kneschke [lkneschke@linux-at-work.de] *
* maintained by Klaus Leithoff *
* ------------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
@ -343,167 +344,12 @@
$this->translate();
// if(!isset($_GET['printable']))
// {
// navbar start
// compose as new URL
$linkData = array (
'menuaction' => 'felamimail.uicompose.composeAsNew',
'icServer' => $this->icServer,
'folder' => base64_encode($this->mailbox),
'reply_id' => $this->uid,
);
// navBar buttons
$headerData = array('uid'=>$this->uid);
if($partID != '') {
$linkData['part_id'] = $partID;
$headerData['partid'] = $partID;
}
$asnewURL = $GLOBALS['egw']->link('/index.php',$linkData);
// reply url
$linkData = array (
'menuaction' => 'felamimail.uicompose.reply',
'icServer' => $this->icServer,
'folder' => base64_encode($this->mailbox),
'reply_id' => $this->uid,
);
if($partID != '') {
$linkData['part_id'] = $partID;
}
$replyURL = $GLOBALS['egw']->link('/index.php',$linkData);
// reply all url
$linkData = array (
'menuaction' => 'felamimail.uicompose.replyAll',
'icServer' => $this->icServer,
'folder' => base64_encode($this->mailbox),
'reply_id' => $this->uid,
);
if($partID != '') {
$linkData['part_id'] = $partID;
}
$replyAllURL = $GLOBALS['egw']->link('/index.php',$linkData);
// forward url
$linkData = array (
'menuaction' => 'felamimail.uicompose.forward',
'reply_id' => $this->uid,
'folder' => base64_encode($this->mailbox),
);
if($partID != '') {
$linkData['part_id'] = $partID;
}
$forwardURL = $GLOBALS['egw']->link('/index.php',$linkData);
//delete url
$linkData = array (
'menuaction' => 'felamimail.uifelamimail.deleteMessage',
'icServer' => $this->icServer,
'folder' => base64_encode($this->mailbox),
'message' => $this->uid,
);
$deleteURL = $GLOBALS['egw']->link('/index.php',$linkData);
$navbarImages = array(
'new' => array(
'action' => "window.location.href = '$asnewURL'",
'tooltip' => lang('compose as new'),
),
'mail_reply' => array(
'action' => "window.location.href = '$replyURL'",
'tooltip' => lang('reply'),
),
'mail_replyall' => array(
'action' => "window.location.href = '$replyAllURL'",
'tooltip' => lang('reply all'),
),
'mail_forward' => array(
'action' => "window.location.href = '$forwardURL'",
'tooltip' => lang('forward'),
),
'delete' => array(
'action' => "window.location.href = '$deleteURL'",
'tooltip' => lang('delete'),
),
);
foreach($navbarImages as $buttonName => $buttonInfo) {
$navbarButtons .= $uiWidgets->navbarButton($buttonName, $buttonInfo['action'], $buttonInfo['tooltip']);
}
$navbarButtons .= $uiWidgets->navbarSeparator();
// print url
$linkData = array (
'menuaction' => 'felamimail.uidisplay.printMessage',
'uid' => $this->uid,
'folder' => base64_encode($this->mailbox),
);
if($partID != '') {
$linkData['part'] = $partID;
}
$printURL = $GLOBALS['egw']->link('/index.php',$linkData);
// infolog URL
$linkData = array(
'menuaction' => 'infolog.infolog_ui.import_mail',
'uid' => $this->uid,
'mailbox' => base64_encode($this->mailbox)
);
if($partID != '') {
$linkData['part'] = $partID;
}
$to_infologURL = $GLOBALS['egw']->link('/index.php',$linkData);
// viewheader url
$linkData = array (
'menuaction' => 'felamimail.uidisplay.displayHeader',
'uid' => $this->uid,
'mailbox' => base64_encode($this->mailbox)
);
if($partID != '') {
$linkData['part'] = $partID;
}
$viewHeaderURL = $GLOBALS['egw']->link('/index.php',$linkData);
$navbarImages = array();
// save message url
$linkData = array (
'menuaction' => 'felamimail.uidisplay.saveMessage',
'uid' => $this->uid,
'mailbox' => base64_encode($this->mailbox)
);
if($partID != '') {
$linkData['part'] = $partID;
}
$saveMessageURL = $GLOBALS['egw']->link('/index.php',$linkData);
$navbarImages = array();
//print email
$navbarImages = array(
'fileprint' => array(
'action' => "window.location.href = '$printURL'",
'tooltip' => lang('print it'),
),
);
if ($GLOBALS['egw_info']['user']['apps']['infolog']) $navbarImages['to_infolog'] = array(
'action' => "window.open('$to_infologURL','_blank','dependent=yes,width=750,height=550,scrollbars=yes,status=yes')",
'tooltip' => lang('save as infolog'));
// save email as
$navbarImages['fileexport'] = array(
'action' => "window.location.href = '$saveMessageURL'",
'tooltip' => lang('save message to disk'),
);
// view header lines
$navbarImages['kmmsgread'] = array(
'action' => "fm_displayHeaderLines('$viewHeaderURL')",
'tooltip' => lang('view header lines'),
);
foreach($navbarImages as $buttonName => $buttonData) {
$navbarButtons .= $uiWidgets->navbarButton($buttonName, $buttonData['action'], $buttonData['tooltip']);
}
$this->t->set_var('navbarButtonsLeft',$navbarButtons);
$this->t->set_var('navbarButtonsLeft',$uiWidgets->displayMessageActions($headerData, $this->mailbox, $this->icServer));
$navbarButtons = '';
$navbarImages = array();
@ -777,6 +623,7 @@
function displayBody()
{
$partID = $_GET['part'];
if (empty($this->uid) && !empty($_GET['uid']) ) $this->uid = 9247;//$_GET['uid'];
if (!empty($_GET['mailbox'])) $this->mailbox = base64_decode($_GET['mailbox']);
$this->bofelamimail->reopen($this->mailbox);

View File

@ -5,6 +5,7 @@
* http://www.phpgw.de *
* http://www.egroupware.org *
* Written by : Lars Kneschke [lkneschke@linux-at-work.de] *
* maintained by Klaus Leithoff *
* ------------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
@ -564,44 +565,7 @@
} else {
$this->t->set_var('quota_display','&nbsp;');
}
/*
$linkData = array (
'menuaction' => 'felamimail.uicompose.compose'
);
$urlCompose = "egw_openWindowCentered('".$GLOBALS['egw']->link('/index.php',$linkData)."','compose', 700, egw_getWindowOuterHeight());";
$navbarImages = array(
'new' => array(
'action' => $urlCompose,
'tooltip' => lang('compose'),
),
'read_small' => array(
'action' => "flagMessages('read')",
'tooltip' => lang('mark selected as read'),
),
'unread_small' => array(
'action' => "flagMessages('unread')",
'tooltip' => lang('mark selected as unread'),
),
'unread_flagged_small' => array(
'action' => "flagMessages('flagged')",
'tooltip' => lang('mark selected as flagged'),
),
'read_flagged_small' => array(
'action' => "flagMessages('unflagged')",
'tooltip' => lang('mark selected as unflagged'),
),
'delete' => array(
'action' => "deleteMessages(xajax.getFormValues('formMessageList'))",
'tooltip' => lang('mark as deleted'),
),
);
foreach($navbarImages as $buttonName => $buttonInfo) {
$navbarButtons .= $uiwidgets->navbarButton($buttonName, $buttonInfo['action'], $buttonInfo['tooltip']);
}
$this->t->set_var('navbarButtonsLeft',$navbarButtons);
*/
// navigation
$navbarImages = array(
'last' => array(
'action' => "jumpEnd(); return false;",
@ -736,28 +700,6 @@
);
$selectStatus = html::select('status', $defaultSelectStatus, $statusTypes, false, "style='width:100%;' onchange='javascript:quickSearch();' id='status'");
$this->t->set_var('select_status', $selectStatus);
/* moved to sidebar
// the data needed here are collected at the start of this function
if (!isset($activeIdentity->id) && $selectedID == 0) {
$identities[0] = $activeIdentity->realName.' '.$activeIdentity->organization.' <'.$activeIdentity->emailAddress.'>';
}
// if you use user defined accounts you may want to access the profile defined with the emailadmin available to the user
if ($activeIdentity->id) {
$boemailadmin = new emailadmin_bo();
$defaultProfile = $boemailadmin->getUserProfile() ;
#_debug_array($defaultProfile);
$identitys =& $defaultProfile->identities;
$icServers =& $defaultProfile->ic_server;
foreach ($identitys as $tmpkey => $identity)
{
if (empty($icServers[$tmpkey]->host)) continue;
$identities[0] = $identity->realName.' '.$identity->organization.' <'.$identity->emailAddress.'>';
}
#$identities[0] = $defaultIdentity->realName.' '.$defaultIdentity->organization.' <'.$defaultIdentity->emailAddress.'>';
}
$selectAccount = html::select('accountSelect', $selectedID, $identities, true, "style='width:100%;' onchange='changeActiveAccount(this);'");
$this->t->set_var('accountSelect', $selectAccount);
*/
if($this->connectionStatus === false) {
$this->t->set_var('connection_error_message', lang($this->bofelamimail->getErrorMessage()));
@ -813,7 +755,6 @@
$totalMessage = $headers['info']['total'];
$langTotal = lang("total");
$this->t->set_var('maxMessages',$i);
if($_GET["select_all"] == "select_all") {
$this->t->set_var('checkedCounter',$i);
@ -876,28 +817,10 @@
}
$this->t->parse('status_row','status_row_tpl',True);
//print __LINE__ . ': ' . (microtime(true) - $this->timeCounter) . '<br>';
/* moved to sidebar
$folderObjects = $this->bofelamimail->getFolderObjects(true, false);
//print __LINE__ . ': ' . (microtime(true) - $this->timeCounter) . '<br>';
$folderStatus = $this->bofelamimail->getFolderStatus($this->mailbox);
//print __LINE__ . ': ' . (microtime(true) - $this->timeCounter) . '<br>';
$folderTree = $uiwidgets->createHTMLFolder
(
$folderObjects,
$this->mailbox,
$folderStatus['unseen'],
lang('IMAP Server'),
$imapServer->username.'@'.$imapServer->host,
'divFolderTree',
FALSE
);
*/
//print __LINE__ . ': ' . (microtime(true) - $this->timeCounter) . '<br>';
$this->bofelamimail->closeConnection();
}
$this->t->set_var('current_mailbox',$current_mailbox);
$this->t->set_var('current_mailbox',$this->mailbox);
//$this->t->set_var('folder_tree',$folderTree);
$this->t->set_var('options_folder',$options_folder);

View File

@ -40,7 +40,8 @@
*
* @package FeLaMiMail
* @author Lars Kneschke
* @version 1.35
* @maintainer Klaus Leithoff
* @version 1.7.
* @copyright Lars Kneschke 2004
* @license http://www.opensource.org/licenses/bsd-license.php BSD
*/
@ -248,6 +249,7 @@
// $_rowStyle felamimail or outlook
function messageTable($_headers, $_folderType, $_folderName, $_readInNewWindow, $_rowStyle='felamimail')
{
//error_log(__METHOD__);
$this->t = CreateObject('phpgwapi.Template',EGW_APP_TPL);
$this->t->set_file(array("body" => 'mainscreen.tpl'));
$this->t->set_block('body','header_row_felamimail');
@ -261,6 +263,7 @@
$i=0;
$firstuid = null;
foreach((array)$_headers['header'] as $header)
{
//_debug_array($header);
@ -392,7 +395,13 @@
$this->t->set_var('datetime', $GLOBALS['egw']->common->show_date($header['date']/*,$GLOBALS['egw_info']['user']['preferences']['common']['dateformat']*/));
$this->t->set_var('size', $this->show_readable_size($header['size']));
if ($firstuid === null)
{
//_debug_array($header);
$firstuid = $header['uid'];
$firstheader = $header;
$firstFullAddress = $full_address;
}
if($_folderType == 2 || $_folderType == 3) {
$linkData = array (
'menuaction' => 'felamimail.uicompose.composeFromDraft',
@ -405,6 +414,7 @@
$windowName = 'composeFromDraft_'.$header['uid'];
$this->t->set_var('read_message_windowName', $windowName);
$this->t->set_var('preview_message_windowName', $windowName);
} else {
# _debug_array($header);
$linkData = array (
@ -418,6 +428,10 @@
$windowName = ($_readInNewWindow == 1 ? 'displayMessage' : 'displayMessage_'.$header['uid']);
$this->t->set_var('read_message_windowName', $windowName);
if ($GLOBALS['egw_info']['user']['preferences']['felamimail']['PreViewFrameHeight']>0) $windowName = 'MessagePreview_'.$header['uid'].'_'.$_folderType;
$this->t->set_var('preview_message_windowName', $windowName);
}
if($_folderType > 0) {
@ -448,7 +462,7 @@
);
$windowName = 'compose'.$header['uid'];
$this->t->set_var('url_compose',"egw_openWindowCentered('".$GLOBALS['egw']->link('/index.php',$linkData)."','$windowName',700,egw_getWindowOuterHeight());");
/*
$linkData = array
(
'menuaction' => 'addressbook.addressbook_ui.edit',
@ -459,6 +473,7 @@
//TODO: url_add_to_addressbook isn't in any of the templates.
//If you want to use it, you need to adopt syntax to the new addressbook (popup)
$this->t->set_var('url_add_to_addressbook',$GLOBALS['egw']->link('/index.php',$linkData));
*/
$this->t->set_var('msg_icon_sm',$msg_icon_sm);
$this->t->set_var('phpgw_images',EGW_IMAGES);
@ -472,11 +487,273 @@
break;
}
}
$IFRAMEBody = $this->updateMessagePreview($firstheader,$_folderType,$_folderName);
$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'));
$this->t->parse("out","message_table");
return $this->t->get('out','message_table');
}
function updateMessagePreview($headerData,$_folderType,$_folderName,$_icServer=0)
{
// IFrame for Preview ....
if ($headerData['uid'] && $GLOBALS['egw_info']['user']['preferences']['felamimail']['PreViewFrameHeight']>0)
{
if ($_folderType > 0) {
// sent or drafts or template folder
if (!empty($headerData['to_name'])) {
$sender_name = $headerData['to_name'];
$full_address = $headerData['to_name'].' <'.$headerData['to_address'].'>';
} else {
$sender_name = $headerData['to_address'];
$full_address = $headerData['to_address'];
}
} else {
if (!empty($headerData['sender_name'])) {
$sender_name = $headerData['sender_name'];
$full_address = $headerData['sender_name'].' <'.$headerData['sender_address'].'>';
} else {
$sender_name = $headerData['sender_address'];
$full_address = $headerData['sender_address'];
}
}
$linkData = array (
'menuaction' => 'felamimail.uidisplay.display',
'showHeader' => 'false',
'mailbox' => base64_encode($_folderName),
'uid' => $headerData['uid'],
'id' => $headerData['id'],
);
$windowName = 'displayMessage_'.$headerData['uid'];
if($headerData['mimetype'] == 'multipart/mixed' ||
$headerData['mimetype'] == 'multipart/related' ||
substr($headerData['mimetype'],0,11) == 'application' ||
substr($headerData['mimetype'],0,5) == 'audio') {
$image = html::image('felamimail','attach');
$image = "<a name=\"subject_url\" href=\"#\"
onclick=\"fm_readMessage('".$GLOBALS['egw']->link('/index.php',$linkData)."', '".$windowName."', this); return false;\"
title=\"".$headerData['subject']."\">".$image."</a>";
$windowName = ($_readInNewWindow == 1 ? 'displayMessage' : 'displayMessage_'.$header['uid']);
} else {
$image = '';
}
$subject = "<a name=\"subject_url\" href=\"#\"
onclick=\"fm_readMessage('".$GLOBALS['egw']->link('/index.php',$linkData)."', '".$windowName."', this); return false;\"
title=\"".$headerData['subject']."\">".$headerData['subject']."</a>";
$IFrameHeight = $GLOBALS['egw_info']['user']['preferences']['felamimail']['PreViewFrameHeight'];
$linkData = array (
'menuaction' => 'felamimail.uidisplay.displayBody',
'uid' => $headerData['uid'],
'mailbox' => base64_encode($_folderName)
);
//_debug_array($GLOBALS['egw']->link('/index.php',$linkData));
$IFRAMEBody = "<TABLE BORDER=\"1\" rules=\"rows\" style=\"width:100%;\">
<TR class=\"th\" style=\"width:73%;\">
<TD nowrap valign=\"top\">
".($_folderType > 0?lang('to'):lang('from')).':<b>'.$full_address .'</b><br> '.
lang('date').':<b>'.$GLOBALS['egw']->common->show_date($headerData['date']/*,$GLOBALS['egw_info']['user']['preferences']['common']['dateformat']*/)."</b><br>
".lang('subject').":<b>".$subject."</b>
</TD>
<td style=\"width:2%;\">
$image
</td>
<td style=\"width:25%;\" align=\"right\">
".$this->navbarSeparator().$this->displayMessageActions($headerData, $_folderName, $_icServer,true)."
</td>
</TR>
<TR>
<TD nowrap valign=\"top\" colspan=\"3\" height=\"".$IFrameHeight."\">
<iframe id=\"messageIFRAME\" frameborder=\"1\" height=\"".$IFrameHeight."\" scrolling=\"auto\" src=\"".$GLOBALS['egw']->link('/index.php',$linkData)."\">
</iframe>
</TD>
</TR>
</TABLE>";
}
else
{
$IFRAMEBody = "&nbsp;";
}
return $IFRAMEBody;
}
function displayMessageActions($_headerData, $_folderName, $_icServer, $_forceNewWindow=false)
{
if ($_forceNewWindow)
{
list($fm_width,$fm_height) = explode('x',egw_link::get_registry('felamimail','view_popup'));
}
// navbar start
// compose as new URL
$linkData = array (
'menuaction' => 'felamimail.uicompose.composeAsNew',
'icServer' => $_icServer,
'folder' => base64_encode($_folderName),
'reply_id' => $_headerData['uid'],
);
if($_headerData['partid'] != '') {
$linkData['part_id'] = $_headerData['partid'];
}
$asnewURL = $GLOBALS['egw']->link('/index.php',$linkData);
// reply url
$linkData = array (
'menuaction' => 'felamimail.uicompose.reply',
'icServer' => $_icServer,
'folder' => base64_encode($_folderName),
'reply_id' => $_headerData['uid'],
);
if($_headerData['partid'] != '') {
$linkData['part_id'] = $_headerData['partid'];
}
$replyURL = $GLOBALS['egw']->link('/index.php',$linkData);
// reply all url
$linkData = array (
'menuaction' => 'felamimail.uicompose.replyAll',
'icServer' => $_icServer,
'folder' => base64_encode($_folderName),
'reply_id' => $_headerData['uid'],
);
if($_headerData['partid'] != '') {
$linkData['part_id'] = $_headerData['partid'];
}
$replyAllURL = $GLOBALS['egw']->link('/index.php',$linkData);
// forward url
$linkData = array (
'menuaction' => 'felamimail.uicompose.forward',
'reply_id' => $_headerData['uid'],
'folder' => base64_encode($_folderName),
);
if($_headerData['partid'] != '') {
$linkData['part_id'] = $_headerData['partid'];
}
$forwardURL = $GLOBALS['egw']->link('/index.php',$linkData);
//delete url
$linkData = array (
'menuaction' => 'felamimail.uifelamimail.deleteMessage',
'icServer' => $_icServer,
'folder' => base64_encode($_folderName),
'message' => $_headerData['uid'],
);
$deleteURL = $GLOBALS['egw']->link('/index.php',$linkData);
$navbarImages = array(
'new' => array(
'action' => ($_forceNewWindow ? "egw_openWindowCentered('$asnewURL','composeasnew_".$_headerData['uid']."',".$fm_width.",".$fm_height.");": "window.location.href = '$asnewURL'"),
'tooltip' => lang('compose as new'),
),
'mail_reply' => array(
'action' => ($_forceNewWindow ? "egw_openWindowCentered('$replyURL','reply_".$_headerData['uid']."',".$fm_width.",".$fm_height.");": "window.location.href = '$replyURL'"),
'tooltip' => lang('reply'),
),
'mail_replyall' => array(
'action' => ($_forceNewWindow ? "egw_openWindowCentered('$replyAllURL','replyAll_".$_headerData['uid']."',".$fm_width.",".$fm_height.");": "window.location.href = '$replyAllURL'"),
'tooltip' => lang('reply all'),
),
'mail_forward' => array(
'action' => ($_forceNewWindow ? "egw_openWindowCentered('$forwardURL','forward_".$_headerData['uid']."',".$fm_width.",".$fm_height.");": "window.location.href = '$forwardURL'"),
'tooltip' => lang('forward'),
),
'delete' => array(
'action' => ($_forceNewWindow ? "window.open('$deleteURL','_blank','dependent=yes,width=100,height=100,toolbar=no,scrollbars=no,status=no')": "window.location.href = '$deleteURL'"),
'tooltip' => lang('delete'),
),
);
foreach($navbarImages as $buttonName => $buttonInfo) {
$navbarButtons .= $this->navbarButton($buttonName, $buttonInfo['action'], $buttonInfo['tooltip']);
}
$navbarButtons .= $this->navbarSeparator();
// print url
$linkData = array (
'menuaction' => 'felamimail.uidisplay.printMessage',
'uid' => $_headerData['uid'],
'folder' => base64_encode($_folderName),
);
if($_headerData['partid'] != '') {
$linkData['part'] = $_headerData['partid'];
}
$printURL = $GLOBALS['egw']->link('/index.php',$linkData);
// infolog URL
$linkData = array(
'menuaction' => 'infolog.infolog_ui.import_mail',
'uid' => $_headerData['uid'],
'mailbox' => base64_encode($_folderName)
);
if($_headerData['partid'] != '') {
$linkData['part'] = $_headerData['partid'];
}
$to_infologURL = $GLOBALS['egw']->link('/index.php',$linkData);
// viewheader url
$linkData = array (
'menuaction' => 'felamimail.uidisplay.displayHeader',
'uid' => $_headerData['uid'],
'mailbox' => base64_encode($_folderName)
);
if($_headerData['partid'] != '') {
$linkData['part'] = $_headerData['partid'];
}
$viewHeaderURL = $GLOBALS['egw']->link('/index.php',$linkData);
$navbarImages = array();
// save message url
$linkData = array (
'menuaction' => 'felamimail.uidisplay.saveMessage',
'uid' => $_headerData['uid'],
'mailbox' => base64_encode($_folderName)
);
if($_headerData['partid'] != '') {
$linkData['part'] = $_headerData['partid'];
}
$saveMessageURL = $GLOBALS['egw']->link('/index.php',$linkData);
$navbarImages = array();
//print email
$navbarImages = array(
'fileprint' => array(
'action' => ($_forceNewWindow ? "egw_openWindowCentered('$printURL','forward_".$_headerData['uid']."',".$fm_width.",".$fm_height.");": "window.location.href = '$printURL'"),
'tooltip' => lang('print it'),
),
);
if ($GLOBALS['egw_info']['user']['apps']['infolog'])
{
list($i_width,$i_height) = explode('x',egw_link::get_registry('infolog','add_popup'));
$navbarImages['to_infolog'] = array(
'action' => "window.open('$to_infologURL','_blank','dependent=yes,width=".$i_width.",height=".$i_height.",scrollbars=yes,status=yes')",
'tooltip' => lang('save as infolog'));
}
// save email as
$navbarImages['fileexport'] = array(
'action' => ($_forceNewWindow ? "window.open('$saveMessageURL','_blank','dependent=yes,width=100,height=100,scrollbars=yes,status=yes')": "window.location.href = '$saveMessageURL'"),
'tooltip' => lang('save message to disk'),
);
// view header lines
$navbarImages['kmmsgread'] = array(
'action' => "fm_displayHeaderLines('$viewHeaderURL')",
'tooltip' => lang('view header lines'),
);
foreach($navbarImages as $buttonName => $buttonData) {
$navbarButtons .= $this->navbarButton($buttonName, $buttonData['action'], $buttonData['tooltip']);
}
return $navbarButtons;
}
/**
* create multiselectbox
*

View File

@ -48,6 +48,10 @@ function displayMessage(_url,_windowName) {
egw_openWindowCentered(_url, _windowName, 850, egw_getWindowOuterHeight());
}
function fm_displayHeaderLines(_url) {
egw_openWindowCentered(_url,'fm_display_headerLines','700','600',window.outerWidth/2,window.outerHeight/2);
}
function emptyTrash() {
setStatusMessage('<span style="font-weight: bold;">' + lang_emptyTrashFolder + '</span>');
xajax_doXMLHTTP("felamimail.ajaxfelamimail.emptyTrash");
@ -339,6 +343,12 @@ function refresh() {
resetMessageSelect();
xajax_doXMLHTTP('felamimail.ajaxfelamimail.refreshMessageList');
if (fm_previewMessageID>0)
{
MessageBuffer = document.getElementById('messageCounter').innerHTML;
setStatusMessage('<span style="font-weight: bold;">'+ lang_updating_view +'</span>');
xajax_doXMLHTTP("felamimail.ajaxfelamimail.refreshMessagePreview",fm_previewMessageID,fm_previewMessageFolderType);
}
}
function refreshFolderStatus(_nodeID,mode) {
@ -350,6 +360,12 @@ function refreshFolderStatus(_nodeID,mode) {
}
var activeFolders = getTreeNodeOpenItems(nodeToRefresh,mode2use);
xajax_doXMLHTTP('felamimail.ajaxfelamimail.refreshFolderList', activeFolders);
if (fm_previewMessageID>0)
{
MessageBuffer = document.getElementById('messageCounter').innerHTML;
setStatusMessage('<span style="font-weight: bold;">'+ lang_updating_view +'</span>');
xajax_doXMLHTTP("felamimail.ajaxfelamimail.refreshMessagePreview",fm_previewMessageID,fm_previewMessageFolderType);
}
}
function refreshView() {
@ -380,7 +396,18 @@ function fm_startTimerMessageListUpdate(_refreshTimeOut) {
}
function fm_readMessage(_url, _windowName, _node) {
egw_openWindowCentered(_url, _windowName, 750, egw_getWindowOuterHeight());
var windowArray = _windowName.split('_');
if (windowArray[0] == 'MessagePreview')
{
//document.getElementById('spanMessagePreview').innerHTML = '';
MessageBuffer = document.getElementById('messageCounter').innerHTML;
setStatusMessage('<span style="font-weight: bold;">'+ lang_updating_view +'</span>');
fm_previewMessageID = windowArray[1];
fm_previewMessageFolderType = windowArray[2];
xajax_doXMLHTTP("felamimail.ajaxfelamimail.refreshMessagePreview",windowArray[1],windowArray[2]);
} else {
egw_openWindowCentered(_url, _windowName, 750, egw_getWindowOuterHeight());
}
trElement = _node.parentNode.parentNode.parentNode;
trElement.style.fontWeight='normal';

View File

@ -3,6 +3,7 @@
(only cc/bcc) felamimail de (kein Kopie/Blindkopie)
(separate multiple addresses by comma) felamimail de (mehrere Adressen durch Komma trennen)
(unknown sender) felamimail de (unbekannter Absender)
3paneview: if you want to see a preview of a mail by single clicking onto the subject, set the height for the message-list and the preview area here (300 seems to be a good working value). the preview will be displayed at the end of the message list on demand (click). felamimail de Vorschauansicht: Wenn Sie eine Vorschauansicht von eMails wünschen, müssen Sie hier die Höhe des Vorschaubereichs und der Nachrichtenliste festlegen. (300 hat sich als zufriedenstellender Wert erwiesen). Die Vorschau wird durch einen einfachen Klick auf den Betreff der anzuzeigenden Nachricht aktiviert.
aborted felamimail de abgebrochen
activate felamimail de aktivieren
activate script felamimail de Script aktivieren
@ -319,6 +320,7 @@ no signature felamimail de keine Signatur
no stationery felamimail de Kein Briefkopf
no subject given! felamimail de Kein Betreff angegeben!
no supported imap authentication method could be found. felamimail de Keine unterstützte IMAP Authentifizierungsmethode gefunden.
no valid data to create mailprofile!! felamimail de Keine gültigen Daten zur Erzeugung eines Mailprofils!!
no valid emailprofile selected!! felamimail de Sie haben kein gültiges E-Mail-Profil ausgewählt!
none felamimail de kein
none, create all felamimail de keine, erstellt alle
@ -430,6 +432,8 @@ template folder felamimail de Vorlagen Ordner
templates felamimail de Vorlagen
text only felamimail de Nur Text
text/plain felamimail de text/plain
the action will be applied to all messages of the current folder.\ndo you want to proceed? felamimail de Die Aktion wird auf ALLE Nachrichten des aktuellen Ordners angewendet.\nMöchten Sie fortfahren?
the action will be applied to all messages of the current folder.ndo you want to proceed? felamimail de Die Aktion wird auf ALLE Nachrichten des aktuellen Ordners angewendet.\nMöchten Sie fortfahren?
the connection to the imap server failed!! felamimail de Die Verbindung zum IMAP Server ist fehlgeschlagen
the imap server does not appear to support the authentication method selected. please contact your system administrator. felamimail de Der IMAP Server scheint die ausgewählte Authentifizierungsmethode nicht zu unterstützen. Bitte sprechen Sie mit Ihrem Systemadministrator.
the message sender has requested a response to indicate that you have read this message. would you like to send a receipt? felamimail de Der Absender der Nachricht hat eine Antwort angefordert, welche Ihm anzeigt das Sie seine Nachricht gelesen haben. Wollen Sie diese Antwort senden?

View File

@ -3,6 +3,7 @@
(only cc/bcc) felamimail en (only Cc/Bcc)
(separate multiple addresses by comma) felamimail en (separate multiple addresses by comma)
(unknown sender) felamimail en (unknown sender)
3paneview: if you want to see a preview of a mail by single clicking onto the subject, set the height for the message-list and the preview area here (300 seems to be a good working value). the preview will be displayed at the end of the message list on demand (click). felamimail en 3PaneView: If you want to see a preview of a mail by single clicking onto the subject, set the height for the message-list and the preview area here (300 seems to be a good working value). The preview will be displayed at the end of the message list on demand (click).
aborted felamimail en aborted
activate felamimail en Activate
activate script felamimail en activate script
@ -319,6 +320,7 @@ no signature felamimail en no signature
no stationery felamimail en no stationery
no subject given! felamimail en No subject given!
no supported imap authentication method could be found. felamimail en No supported IMAP authentication method could be found.
no valid data to create mailprofile!! felamimail en No valid data to create MailProfile!!
no valid emailprofile selected!! felamimail en No Valid Email Profile Selected!!
none felamimail en none
none, create all felamimail en none, create all
@ -430,6 +432,7 @@ template folder felamimail en Template folder
templates felamimail en Templates
text only felamimail en Text only
text/plain felamimail en text/plain
the action will be applied to all messages of the current folder.\ndo you want to proceed? felamimail en The action will be applied to all messages of the current folder.\nDo you want to proceed?
the connection to the imap server failed!! felamimail en The connection to the IMAP Server failed!!
the imap server does not appear to support the authentication method selected. please contact your system administrator. felamimail en The IMAP server does not appear to support the authentication method selected. Please contact your system administrator.
the message sender has requested a response to indicate that you have read this message. would you like to send a receipt? felamimail en The message sender has requested a response to indicate that you have read this message. Would you like to send a receipt?

View File

@ -11,15 +11,14 @@
$setup_info['felamimail']['name'] = 'felamimail';
$setup_info['felamimail']['title'] = 'FeLaMiMail';
$setup_info['felamimail']['version'] = '1.6.001';
$setup_info['felamimail']['version'] = '1.7.001';
$setup_info['felamimail']['app_order'] = 2;
$setup_info['felamimail']['enable'] = 1;
$setup_info['felamimail']['index'] = 'felamimail.uifelamimail.viewMainScreen';
$setup_info['felamimail']['author'] = 'Lars Kneschke';
$setup_info['felamimail']['license'] = 'GPL';
$setup_info['felamimail']['description'] =
'IMAP emailclient for eGroupWare';
$setup_info['felamimail']['description'] = 'IMAP emailclient for eGroupWare';
$setup_info['felamimail']['maintainer'] = 'Klaus Leithoff';
$setup_info['felamimail']['maintainer_email'] = 'kl@leithoff.net';
@ -35,6 +34,7 @@ $setup_info['felamimail']['hooks']['deleteaccount'] = 'felamimail.bofelamimail.d
$setup_info['felamimail']['hooks']['editaccount'] = 'felamimail.bofelamimail.updateAccount';
$setup_info['felamimail']['hooks']['edit_user'] = 'felamimail.bofelamimail.adminMenu';
$setup_info['felamimail']['hooks']['verify_settings'] = 'felamimail.bofelamimail.forcePrefReload';
$setup_info['felamimail']['hooks']['search_link'] = 'felamimail_hooks::search_link';
/* Dependencies for this app to work */
$setup_info['felamimail']['depends'][] = array(

View File

@ -534,4 +534,11 @@
$GLOBALS['egw_setup']->oProc->AddColumn('egw_felamimail_accounts','fm_ic_templatefolder', array('type' => 'varchar','precision' => '128'));
return $GLOBALS['setup_info']['felamimail']['currentver'] = '1.6.001';
}
$test[] = '1.6.001';
function felamimail_upgrade1_6_001()
{
// no real changes here
return $GLOBALS['setup_info']['felamimail']['currentver'] = '1.7.001';
}
?>

View File

@ -22,6 +22,8 @@ var lang_updating_view = '{lang_updating_view}';
var lang_mark_all_messages = '{lang_mark_all_messages}';
var lang_confirm_all_messages = '{lang_confirm_all_messages}';
var MessageBuffer;
var activityImagePath = '{ajax-loader}';
// how many row are selected currently
@ -30,6 +32,8 @@ var checkedCounter=0;
// the refreshtimer objects
var aktiv;
var fm_timerFolderStatus;
var fm_previewMessageID;
var fm_previewMessageFolderType;
// refresh time for mailboxview
var refreshTimeOut = {refreshTime};
@ -63,6 +67,9 @@ fm_startTimerMessageListUpdate(refreshTimeOut);
<td align="center" width="100px">
{select_status}
</td>
<td align="center" width="40px">
{select_messagecount}
</td>
<td width="120px" style="white-space:nowrap; align:right; text-align:right;">
<div class="parentDIV" style="text-align:right; align:right;">
{navbarButtonsRight}
@ -114,7 +121,6 @@ fm_startTimerMessageListUpdate(refreshTimeOut);
</form>
<!-- End MessageList -->
</TD>
</TR>
</table>
@ -122,9 +128,14 @@ fm_startTimerMessageListUpdate(refreshTimeOut);
<!-- END main -->
<!-- BEGIN message_table -->
<table BORDER="0" style="width:98%; padding-left:2; table-layout: fixed;" cellspacing="0">
{message_rows}
</table>
<div id="divMessageTableList" style="overflow:auto; height:{messagelist_height}; margin-left:0px; margin-right:0px; margin-top:0px; margin-bottom: 0px; z-index:90; border : 1px solid Silver;">
<table BORDER="0" style="width:98%; padding-left:2; table-layout: fixed;" cellspacing="0">
{message_rows}
</table>
</div>
<span id="spanMessagePreview">
{IFrameForPreview}
</span>
<!-- END message_table -->
<!-- BEGIN status_row_tpl -->
@ -164,7 +175,10 @@ fm_startTimerMessageListUpdate(refreshTimeOut);
{prio_image}{attachment_image}
</td>
<td class="mainscreenRow" style="overflow:hidden; white-space:nowrap;"><nobr>
<a class="{row_css_class}" name="subject_url" href="#" onclick="fm_readMessage('{url_read_message}', '{read_message_windowName}', this); return false;" title="{full_subject}">{header_subject}</a>
<a class="{row_css_class}" name="subject_url" href="#"
onclick="fm_readMessage('{url_read_message}', '{preview_message_windowName}', this); return false;"
ondblclick="fm_readMessage('{url_read_message}', '{read_message_windowName}', this); return false;"
title="{full_subject}">{header_subject}</a>
</td>
<td class="mainscreenRow" width="95px" align="center">
<nobr><span style="font-size:10px" title="{datetime}">{date}</span>
@ -197,7 +211,10 @@ fm_startTimerMessageListUpdate(refreshTimeOut);
<td class="mainscreenRow" width="2px">
</td>
<td class="mainscreenRow" style="overflow:hidden; white-space:nowrap;"><nobr>
<a class="{row_css_class}" name="subject_url" href="#" onclick="fm_readMessage('{url_read_message}', '{read_message_windowName}', this); parentNode.parentNode.parentNode.style.fontWeight='normal'; return false;" title="{full_subject}">{header_subject}</a>
<a class="{row_css_class}" name="subject_url" href="#"
onclick="fm_readMessage('{url_read_message}', '{preview_message_windowName}', this); parentNode.parentNode.parentNode.style.fontWeight='normal'; return false;"
ondblclick="fm_readMessage('{url_read_message}', '{read_message_windowName}', this); parentNode.parentNode.parentNode.style.fontWeight='normal'; return false;"
title="{full_subject}">{header_subject}</a>
</td>
<td class="mainscreenRow" width="95px" align="center">
<nobr><span style="font-size:10px" title="{datetime}">{date}</span>

View File

@ -22,6 +22,8 @@ var lang_updating_view = '{lang_updating_view}';
var lang_mark_all_messages = '{lang_mark_all_messages}';
var lang_confirm_all_messages = '{lang_confirm_all_messages}';
var MessageBuffer;
var activityImagePath = '{ajax-loader}';
var test = '';
@ -31,6 +33,8 @@ var checkedCounter=0;
// the refreshtimer objects
var aktiv;
var fm_timerFolderStatus;
var fm_previewMessageID;
var fm_previewMessageFolderType;
// refresh time for mailboxview
var refreshTimeOut = {refreshTime};
@ -64,6 +68,9 @@ fm_startTimerMessageListUpdate(refreshTimeOut);
<td align="center" width="100px">
{select_status}
</td>
<td align="center" width="40px">
{select_messagecount}
</td>
<td width="120px" style="white-space:nowrap; align:right; text-align:right;">
<div class="parentDIV" style="text-align:right; align:right;">
{navbarButtonsRight}
@ -125,9 +132,14 @@ fm_startTimerMessageListUpdate(refreshTimeOut);
<!-- END main -->
<!-- BEGIN message_table -->
<table BORDER="0" style="width:98%; padding-left:2; table-layout: fixed;" cellspacing="0">
{message_rows}
</table>
<div id="divMessageTableList" style="overflow:auto; height:{messagelist_height}; margin-left:0px; margin-right:0px; margin-top:0px; margin-bottom: 0px; z-index:90; border : 1px solid #9f9f9f; border-top: 0px; background-color: white;">
<table BORDER="0" style="width:98%; padding-left:2; table-layout: fixed;" cellspacing="0">
{message_rows}
</table>
</div>
<span id="spanMessagePreview">
{IFrameForPreview}
</span>
<!-- END message_table -->
<!-- BEGIN status_row_tpl -->
@ -167,7 +179,10 @@ fm_startTimerMessageListUpdate(refreshTimeOut);
{prio_image}{attachment_image}
</td>
<td class="mainscreenRow" style="overflow:hidden; white-space:nowrap;"><nobr>
<a class="{row_css_class}" name="subject_url" href="#" onclick="fm_readMessage('{url_read_message}', '{read_message_windowName}', this); return false;" title="{full_subject}">{header_subject}</a>
<a class="{row_css_class}" name="subject_url" href="#"
onclick="fm_readMessage('{url_read_message}', '{preview_message_windowName}', this); return false;"
ondblclick="fm_readMessage('{url_read_message}', '{read_message_windowName}', this); return false;"
title="{full_subject}">{header_subject}</a>
</td>
<td class="mainscreenRow" width="95px" align="center">
<nobr><span style="font-size:10px" title="{datetime}">{date}</span>
@ -200,7 +215,10 @@ fm_startTimerMessageListUpdate(refreshTimeOut);
<td class="mainscreenRow" width="2px">
</td>
<td class="mainscreenRow" style="overflow:hidden; white-space:nowrap;"><nobr>
<a class="{row_css_class}" name="subject_url" href="#" onclick="fm_readMessage('{url_read_message}', '{read_message_windowName}', this); parentNode.parentNode.parentNode.style.fontWeight='normal'; return false;" title="{full_subject}">{header_subject}</a>
<a class="{row_css_class}" name="subject_url" href="#"
onclick="fm_readMessage('{url_read_message}', '{preview_message_windowName}', this); parentNode.parentNode.parentNode.style.fontWeight='normal'; return false;"
ondblclick="fm_readMessage('{url_read_message}', '{read_message_windowName}', this); parentNode.parentNode.parentNode.style.fontWeight='normal'; return false;"
title="{full_subject}">{header_subject}</a>
</td>
<td class="mainscreenRow" width="95px" align="center">
<nobr><span style="font-size:10px" title="{datetime}">{date}</span>