Author: leithoff
New Revision: 34525
URL: http://www.egroupware.org/viewvc/egroupware?rev=34525&view=rev
Log:
fix for egroupware.org tracker bug #2925; wrong from/to assignment to cols; make attachment icon clickable in MessageList
Modified:
trunk/felamimail/inc/class.uifelamimail.inc.php
trunk/felamimail/inc/class.uiwidgets.inc.php
trunk/felamimail/js/jscode/viewMainScreen.js
trunk/felamimail/templates/default/mainscreen.tpl
trunk/felamimail/templates/jerryr/app.css
trunk/felamimail/templates/jerryr/mainscreen.tpl
Modified: trunk/felamimail/inc/class.uifelamimail.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/felamimail/inc/class.uifelamimail.inc.php?rev=34525&r1=34524&r2=34525&view=diff
— trunk/felamimail/inc/class.uifelamimail.inc.php (original)
+++ trunk/felamimail/inc/class.uifelamimail.inc.php Tue Apr 5 15:19:35 2011
@@ -985,7 +985,7 @@
#$headers = $this->bofelamimail->getHeaders($this->startMessage, $maxMessages, $this->sort);
$headerCount = count($headers[‘header’]);
}
+/*
if ($this->bofelamimail->isSentFolder($this->mailbox)
>> $this->bofelamimail->isDraftFolder($this->mailbox)
>> $this->bofelamimail->isTemplateFolder($this->mailbox)) {
@@ -993,19 +993,22 @@
} else {
$this->t->set_var(‘lang_from’,lang(“from”));
}
+*/
$msg_icon_sm = $GLOBALS[‘egw’]->common->image(‘felamimail’,‘msg_icon_sm’);
// determine how to display the current folder: as sent folder (to address visible) or normal (from address visible)
$folderType = $this->bofelamimail->getFolderType($this->mailbox);
-
$this->t->set_var('header_rows', -
$uiwidgets->messageTable(
-
$messageTable = $uiwidgets->messageTable( $headers, $folderType, $this->mailbox, $userPreferences['message_newwindow'], $userPreferences['rowOrderStyle'],
-
($this->bofelamimail->sessionData['previewMessage']?$this->bofelamimail->sessionData['previewMessage']:0) -
) -
);
-
($this->bofelamimail->sessionData['previewMessage']?$this->bofelamimail->sessionData['previewMessage']:0));
+//error_log($messageTable);
-
$this->t->set_var('header_rows', $messageTable );
$firstMessage = $headers['info']['first'];
$lastMessage = $headers['info']['last'];
Modified: trunk/felamimail/inc/class.uiwidgets.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/felamimail/inc/class.uiwidgets.inc.php?rev=34525&r1=34524&r2=34525&view=diff
— trunk/felamimail/inc/class.uiwidgets.inc.php (original)
+++ trunk/felamimail/inc/class.uiwidgets.inc.php Tue Apr 5 15:19:35 2011
@@ -339,6 +339,7 @@
function get_grid_js($foldertype,$_folderName,$offset=0,$headers=false,$getAllIds=false)
{
-
//error_log(__METHOD__.__LINE__.array2string(array('Foldertype'=>$foldertype,'Foldername'=>$_folderName,'Offset'=>$offset,'getAllIds'=>$getAllIds))); $js = '<script type="text/javascript">
$(document).ready(function() {
// Create the base objects and feed them with data
@@ -381,6 +382,7 @@
});
';
//
-
//error_log(__METHOD__.__LINE__.$js); return $js; }
@@ -437,7 +439,7 @@
(array)$this->sessionData[‘messageFilter’]
);
}
-
//error_log(__METHOD__.__LINE__.' Data:'.array2string($rvs));
-
//error_log(__METHOD__.__LINE__.' Data:'.array2string($sortResult)); $cols = array('check','status','attachments','subject','toaddress','fromaddress','date','size'); return $this->header2gridelements($sortResult['header'],$cols, $_folderName, $uidOnly,$folderType,$dataForXMails=50,$previewMessage); }
@@ -473,13 +475,13 @@
“id” => “toaddress”, // sent or drafts or template folder means foldertype > 0, use to address instead of from
"caption" => ‘’.lang(“to”).’’,
“width” => “120px”,
-
"visibility" => ($foldertype>0?EGW_COL_VISIBILITY_INVISIBLE:EGW_COL_VISIBILITY_VISIBLE)
-
"visibility" => ($foldertype>0?EGW_COL_VISIBILITY_VISIBLE:EGW_COL_VISIBILITY_INVISIBLE) ), array( "id" => "fromaddress",// sent or drafts or template folder means foldertype > 0, use to address instead of from "caption" => '<a id="gridHeaderFrom" href="#" onclick="changeSorting(\'from\', this); return false;">'.lang("from").'</a>', "width" => "120px",
-
"visibility" => ($foldertype>0?EGW_COL_VISIBILITY_VISIBLE:EGW_COL_VISIBILITY_INVISIBLE)
-
"visibility" => ($foldertype>0?EGW_COL_VISIBILITY_INVISIBLE:EGW_COL_VISIBILITY_VISIBLE) ), array( "id" => "subject",
@@ -749,6 +751,15 @@
substr($header[‘mimetype’],0,5) == ‘audio’ ||
substr($header[‘mimetype’],0,5) == ‘video’)
{
-
$linkDataAttachments = array ( -
'menuaction' => 'felamimail.uidisplay.displayAttachments', -
'showHeader' => 'false', -
'mailbox' => base64_encode($_folderName), -
'uid' => $header['uid'], -
'id' => $header['id'], -
); -
$windowName = 'displayMessage_'.$header['uid']; -
$image = html::image('felamimail','attach'); if (//$header['mimetype'] != 'multipart/mixed' && $header['mimetype'] != 'multipart/signed'
@@ -762,6 +773,10 @@
$attachments = $this->bofelamimail->getMessageAttachments($header[‘uid’]);
if (count($attachments)<1) $image = ’ ';
}
-
if (count($attachments)>0) $image = "<a name=\"subject_url\" href=\"#\" -
onclick=\"fm_handleAttachmentClick(false,'".$GLOBALS['egw']->link('/index.php',$linkDataAttachments)."', '".$windowName."', this); return false;\" -
title=\"".$header['subject']."\">".$image."</a>"; -
$attachmentFlag = $image; } else { $attachmentFlag =' ';
@@ -991,6 +1006,7 @@
$jscall= “sendNotifyMS(”.$headerData[‘uid’]."); ";
}
}
+
//if (strpos( array2string($flags),‘Seen’)===false) $this->bofelamimail->flagMessages(‘read’, $headerData[‘uid’]);
if ($_folderType > 0) {
// sent or drafts or template folder
@@ -1109,12 +1125,11 @@
$uidisplay->uid = $headerData[‘uid’];
$uidisplay->mailbox = $_folderName;
$mailData = $uidisplay->get_load_email_data($headerData[‘uid’], $partID);
$iframe_url = $mailData['src'];
$jscall .= $mailData['onload'];
$script = $mailData['script'];
-
}
-
unset($uidisplay); -
} //_debug_array($GLOBALS['egw']->link('/index.php',$linkData)); $IFRAMEBody = "<TABLE BORDER=\"1\" rules=\"rows\" style=\"table-layout:fixed;width:100%;\"> <TR class=\"th\" style=\"width:100%;\">
Modified: trunk/felamimail/js/jscode/viewMainScreen.js
URL: http://www.egroupware.org/viewvc/egroupware/trunk/felamimail/js/jscode/viewMainScreen.js?rev=34525&r1=34524&r2=34525&view=diff
— trunk/felamimail/js/jscode/viewMainScreen.js (original)
+++ trunk/felamimail/js/jscode/viewMainScreen.js Tue Apr 5 15:19:35 2011
@@ -9,6 +9,10 @@
if (typeof activeFolder == ‘undefined’) var activeFolder = egw_appWindow(‘felamimail’).activeFolder;
if (typeof activeFolderB64 == ‘undefined’) var activeFolderB64 = egw_appWindow(‘felamimail’).activeFolderB64;
if (typeof activityImagePath == ‘undefined’) var activityImagePath = egw_appWindow(‘felamimail’).activityImagePath;
+
+if (typeof actionManager == ‘undefined’) var actionManager = egw_appWindow(‘felamimail’).actionManager;
+if (typeof objectManager == ‘undefined’) var objectManager = egw_appWindow(‘felamimail’).objectManager;
+if (typeof mailGrid == ‘undefined’) var mailGrid = egw_appWindow(‘felamimail’).mailGrid;
// how many row are selected currently
if (typeof checkedCounter == ‘undefined’) var checkedCounter=egw_appWindow(‘felamimail’).checkedCounter;
@@ -725,8 +729,64 @@
aElements[1].style.fontWeight=‘normal’;
}
+/**
-
- Handles message clicks and distinguishes between double clicks and single clicks
- */
+function fm_handleAttachmentClick(_double, _url, _windowName, _node)
+{ - if (_double)
- {
-
// Unset the given message url - the timeout which was triggered in the -
// click handler will now no longer call the fm_readMessage function -
delete (felamimail_messageUrls[_url]); -
window.setTimeout(function () { -
if (typeof felamimail_messageUrls[_url] == "undefined") -
{ -
fm_readAttachments(_url, _windowName, _node); -
//alert('fm_handleAttachmentClick:'+' is double'); -
} -
}, felamimail_dblclick_speed); -
//mailGrid.dataRoot.actionObject.setAllSelected(false); - }
- else
- {
-
// Check whether the given url is already queued. Only continue if this -
// is not the case -
if (typeof felamimail_messageUrls[_url] == "undefined") -
{ -
// Queue the url -
felamimail_messageUrls[_url] = true; -
// Wait "felamimail_dblclick_speed" milliseconds. Only if the doubleclick -
// event doesn't occur in this time, trigger the single click function -
window.setTimeout(function () { -
if (typeof felamimail_messageUrls[_url] == "boolean") -
{ -
fm_readAttachments(_url, _windowName, _node); -
delete (felamimail_messageUrls[_url]); -
//alert('fm_handleAttachmentClick:'+' is single'); -
} -
}, felamimail_dblclick_speed); -
} - }
- var allSelected = mailGrid.dataRoot.actionObject.getSelectedObjects();
- // allSelected[i].id hält die id
- // zurückseten iteration über allSelected (getSelectedObjects) und dann allSelected[i].setSelected(false);
- for (var i=0; i<allSelected.length; i++)
- {
-
if (allSelected[i].id.length>0) -
{ -
allSelected[i].setSelected(false); -
allSelected[i].setFocused(true); -
//alert('fm_handleMessageClick:'+allSelected[i].id); -
} - }
+}
function fm_readAttachments(_url, _windowName, _node) {
egw_openWindowCentered(_url, _windowName, 750, 220);
- egw_appWindow(‘felamimail’).xajax_doXMLHTTP(“felamimail.ajaxfelamimail.refreshFolder”);
- mailGrid.dataRoot.actionObject.setAllSelected(false);
}
function fm_clearSearch() {
Modified: trunk/felamimail/templates/default/mainscreen.tpl
URL: http://www.egroupware.org/viewvc/egroupware/trunk/felamimail/templates/default/mainscreen.tpl?rev=34525&r1=34524&r2=34525&view=diff
— trunk/felamimail/templates/default/mainscreen.tpl (original)
+++ trunk/felamimail/templates/default/mainscreen.tpl Tue Apr 5 15:19:35 2011
@@ -122,7 +122,7 @@
<form name="formMessageList" id="formMessageList">
-
<div id="divMessageList" style="overflow:auto; height:auto; margin-left:0px; margin-right:0px; margin-top:0px; margin-bottom: 0px; z-index:90; border : 1px solid Silver;">
-
<div id="divMessageList" style="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%; ppadding-left:2; table-layout: fixed;" cellspacing="100" cellpadding="100"> --> {header_rows} <!-- </table> -->
Modified: trunk/felamimail/templates/jerryr/app.css
URL: http://www.egroupware.org/viewvc/egroupware/trunk/felamimail/templates/jerryr/app.css?rev=34525&r1=34524&r2=34525&view=diff
— trunk/felamimail/templates/jerryr/app.css (original)
+++ trunk/felamimail/templates/jerryr/app.css Tue Apr 5 15:19:35 2011
@@ -171,20 +171,6 @@
height : 14px;
padding: 0;
}
TR.header_row_DS, TR.header_row_ADS
{
Modified: trunk/felamimail/templates/jerryr/mainscreen.tpl
URL: http://www.egroupware.org/viewvc/egroupware/trunk/felamimail/templates/jerryr/mainscreen.tpl?rev=34525&r1=34524&r2=34525&view=diff
— trunk/felamimail/templates/jerryr/mainscreen.tpl (original)
+++ trunk/felamimail/templates/jerryr/mainscreen.tpl Tue Apr 5 15:19:35 2011
@@ -123,7 +123,7 @@
<form name="formMessageList" id="formMessageList">
-
<div id="divMessageList" style="overflow:auto; height:auto; 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;">
-
<div id="divMessageList" style="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%; ppadding-left:2; table-layout: fixed;" cellspacing="100" cellpadding="100"> --> {header_rows} <!-- </table> -->
@@ -180,7 +180,7 @@
divheight the end size height of the table outer div */
var tabnotavail = false;
var tableheight = 300; //$(tableMessageTableList).height();
-
if (mailGrid != null) tableheight = mailGrid.getDataHeight()+5;
-
if (mailGrid != null) tableheight = mailGrid.getDataHeight(); if (tableheight == 0 || isNaN(tableheight)) // set defaults to compute with, if the property is not set { tabnotavail = true;
@@ -220,7 +220,7 @@
//alert(‘divMessageList Height:’+divheight);
//alert(‘iframe height:’+iframeheight);
divMessageTableList.style.height = divheight + ‘px’;
-
if (mailGrid != null) mailGrid.resize($(divMessageTableList).outerWidth(), divheight-10);
-
if (mailGrid != null) mailGrid.resize($(divMessageTableList).outerWidth(), divheight-90); if (typeof iframe != 'undefined' && typeof tdiframe != 'undefined' && iframe != null && tdiframe != null) {
Xperia™ PLAY
It’s a major breakthrough. An authentic gaming
smartphone on the nation’s most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs