[Vtigercrm-commits] [vtiger-commits] r11022 - in /vtigercrm/branches/5.0.3/modules/Webmails: MailParse.php body.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Thu May 24 15:29:25 EDT 2007


Author: richie
Date: Thu May 24 13:29:19 2007
New Revision: 11022

Log:
Margin space added for both mail header and mail content on detail view also fixed-attachment icon shown for inline attachments -Sri

Modified:
    vtigercrm/branches/5.0.3/modules/Webmails/MailParse.php
    vtigercrm/branches/5.0.3/modules/Webmails/body.php

Modified: vtigercrm/branches/5.0.3/modules/Webmails/MailParse.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Webmails/MailParse.php (original)
+++ vtigercrm/branches/5.0.3/modules/Webmails/MailParse.php Thu May 24 13:29:19 2007
@@ -17,7 +17,8 @@
 
 	$num = $mails[$start_message]->msgno;
 	$msg_ob = new Webmails($MailBox->mbox,$mails[$start_message]->msgno);
-
+	$attach_tab = Array();
+	$msg_ob->loadMail($attach_tab);
 	// TODO: scan the current db vtiger_tables to find a
 	// matching email address that will make a good
 	// candidate for record_id
@@ -55,8 +56,8 @@
 
 
         // Attachment Icons
-        if($msg_ob->has_attachments)
-                $flags.='<a href="javascript:;" onclick="displayAttachments('.$num.');"><img src="themes/images/attachments.gif" border="0" width="8px" height="13px" title="Attachment"></a>&nbsp;';
+        if(count($msg_ob->attname) > 0)
+                $flags.='<a href="javascript:;" onclick="displayAttachments('.$num.');"><img src="themes/images/attachments.gif" border="0" width="8px" height="14" title="Attachment"></a>&nbsp;';
         else
                 $flags.='<img src="themes/images/blank.gif" border="0" width="8px" height="14" alt="">&nbsp;';
 

Modified: vtigercrm/branches/5.0.3/modules/Webmails/body.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Webmails/body.php (original)
+++ vtigercrm/branches/5.0.3/modules/Webmails/body.php Thu May 24 13:29:19 2007
@@ -39,7 +39,7 @@
 $cc = decode_header($email->cc_header);
 $date = decode_header($email->date);
 for($i=0;$i<count($email->attname);$i++){
-	$attachment_links .= $email->anchor_arr[$i].decode_header($email->attname[$i])."</a></br>";
+	$attachment_links .= $email->anchor_arr[$i].decode_header($email->attname[$i])."</a></br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
 }
 $content['body'] = $email->body;
 $content['attachtab'] = $email->attachtab;
@@ -55,20 +55,23 @@
 <!-- Table to display the Header details (From, To, Subject and date) - Starts -->
 					
                                         <table <?php echo $class_str;?> width="100%" border="0" cellpadding="0" cellspacing="0">
-                                                <tr align="left"><td width="100%" align="left"><b><?php echo $mod_strings['LBL_FROM'];?></b><?php echo $from;?></td></tr>
-                                                <tr><td  width="100%" align="left"><b><?php echo $mod_strings['LBL_TO'];?></b><?php echo $to;?></td></tr>
-<tr><td width="100%" align="left"><b><?php echo $mod_strings['LBL_CC'];?></b><?php echo $cc;?></td></tr>
+                                                <tr align="left"><td width="100%" align="left">&nbsp;<b><?php echo $mod_strings['LBL_FROM'];?></b><?php echo $from;?></td></tr>
+                                                <tr><td  width="100%" align="left">&nbsp;<b><?php echo $mod_strings['LBL_TO'];?></b><?php echo $to;?></td></tr>
+<tr><td width="100%" align="left">&nbsp;<b><?php echo $mod_strings['LBL_CC'];?></b><?php echo $cc;?></td></tr>
 
-                                                <tr><td align="left" width="100%"><b><?php echo $mod_strings['LBL_SUBJECT'];?></b><?php echo $subject;?></td></tr>
-	<tr><td align="left" width="100%"><b><?php echo $mod_strings['LBL_DATE'];?></b><?php echo $date;?>
+                                                <tr><td align="left" width="100%">&nbsp;<b><?php echo $mod_strings['LBL_SUBJECT'];?></b><?php echo $subject;?></td></tr>
+	<tr><td align="left" width="100%">&nbsp;<b><?php echo $mod_strings['LBL_DATE'];?></b><?php echo $date;?>
         <?php if(!$_REQUEST['fullview']) {?>
-        <span style="float:right"  colspan="2"><a href="javascript:;" onclick="OpenComposer('<?php echo $mailid;?>','full_view')"> Full Email View</a></span></td>
+        <span style="float:right"  colspan="2"><a href="javascript:;" onclick="OpenComposer('<?php echo $mailid;?>','full_view')"> Full Email View</a></span>
         <?php } ?>
+	</td>
+	</tr>
+	<?php if(isset($_REQUEST['fullview']) && $attachment_links != '') {?>
 	<tr>
-	<?php if($_REQUEST['fullview'] && $email->has_attachments) {?>
-		<td align="left"><b><?php echo $mod_strings['LBL_ATTACHMENT'];?>:</b><?php echo $attachment_links;?></td>
+		<td align="left">&nbsp;<b><?php echo $mod_strings['LBL_ATTACHMENT'];?>:</b><?php echo $attachment_links;?></td>
+	</tr>
 	<?php } ?>
-	</tr>
+	
                                                 <tr><td align="left" style="border-bottom:1px solid #666666;" colspan="3">&nbsp;</td></tr>
                                         </table>
                                         <!-- Table to display the Header details (From, To, Subject and date) - Ends -->
@@ -98,9 +101,9 @@
 //Need to put this along with the subject block*/
 echo $email->att;
 if(!$_REQUEST['fullview'])
-	echo '<div style="overflow:auto;height:410px;">';
+	echo '<div style="overflow:auto;height:400px;padding:5;">';
 else
-	echo '<div style="overflow:auto;height:450px;">';
+	echo '<div style="overflow:auto;height:460px;padding:5;">';
 echo $content['body'];
 
 //test added by Richie





More information about the vtigercrm-commits mailing list