[Vtigercrm-commits] [vtiger-commits] r10943 - in /vtigercrm/branches/5.0.3: Smarty/templates/Webmails.tpl modules/Webmails/ListView.php modules/Webmails/ListViewAjax.php modules/Webmails/MailParse.php modules/Webmails/Webmails.js modules/Webmails/body.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed May 16 12:12:04 EDT 2007
Author: richie
Date: Wed May 16 10:11:55 2007
New Revision: 10943
Log:
* Integrated the webmail UI changes
Modified:
vtigercrm/branches/5.0.3/Smarty/templates/Webmails.tpl
vtigercrm/branches/5.0.3/modules/Webmails/ListView.php
vtigercrm/branches/5.0.3/modules/Webmails/ListViewAjax.php
vtigercrm/branches/5.0.3/modules/Webmails/MailParse.php
vtigercrm/branches/5.0.3/modules/Webmails/Webmails.js
vtigercrm/branches/5.0.3/modules/Webmails/body.php
Modified: vtigercrm/branches/5.0.3/Smarty/templates/Webmails.tpl
==============================================================================
--- vtigercrm/branches/5.0.3/Smarty/templates/Webmails.tpl (original)
+++ vtigercrm/branches/5.0.3/Smarty/templates/Webmails.tpl Wed May 16 10:11:55 2007
@@ -53,14 +53,66 @@
<td colspan=2>
<table border=0 width="100%" cellspacing=0 cellspacing=0>
<tr>
- <td width="20%" class="big mailSubHeader" style="height:30px;"><b>{$MOD.LBL_EMAIL_FOLDERS}</b></td>
+ <td rowspan=6 valign=top class="MatrixLayer1">
+ <table border=0 width="100%" cellspacing=0 cellspacing=0>
+ <tr>
+ <td width="20%" class="big mailSubHeader"><b>{$MOD.LBL_EMAIL_FOLDERS}</b></td>
+ </tr>
+ <tr>
+ <td>
+ <img src="themes/images/mymail.gif" align="absmiddle" /> <span style="cursor:pointer;"><b class="txtGreen">{$MOD.LBL_MY_MAILS}</b> <span id="folderOpts" style="position:absolute;display:none">{$MOD.ADD_FOLDER}</span></span>
+ <div id="box_list">
+ <ul style="list-style-type:none;">
+
+ {foreach item=row from=$BOXLIST}
+ {foreach item=row_values from=$row}
+ {$row_values}
+ {/foreach}
+ {/foreach}
+ </ul></div> <br />
+
+ <img src="themes/images/sentmail.gif" align="absmiddle" /> <b class="txtGreen">{$MOD.LBL_SENT_MAILS}</b>
+ <ul style="list-style-type:none;">
+ <li >
+ <img src="themes/images/opened_folder.gif" align="absmiddle" />
+ <a href="index.php?module=Emails&action=ListView&parenttab=My Home Page&folderid=1&parenttab=My Home Page" class="small">{$MOD.LBL_ALLMAILS}</a> <b></b>
+ </li>
+ <li >
+ <img src="themes/images/opened_folder.gif" align="absmiddle" />
+ <a href="index.php?module=Emails&action=ListView&folderid=2&parenttab=My Home Page" class="small">{$MOD.LBL_TO_CONTACTS}</a> <b></b>
+ </li>
+ <li >
+ <img src="themes/images/opened_folder.gif" align="absmiddle" />
+ <a href="index.php?module=Emails&action=ListView&folderid=3&parenttab=My Home Page" class="small">{$MOD.LBL_TO_ACCOUNTS}</a>
+ </li>
+ <li >
+ <img src="themes/images/opened_folder.gif" align="absmiddle" />
+ <a href="index.php?module=Emails&action=ListView&folderid=4&parenttab=My Home Page" class="small">{$MOD.LBL_TO_LEADS}</a>
+ </li>
+ <li >
+ <img src="themes/images/opened_folder.gif" align="absmiddle" />
+ <a href="index.php?module=Emails&action=ListView&folderid=5&parenttab=My Home Page" class="small">{$MOD.LBL_TO_USERS}</a>
+ </li>
+ </ul><br />
+ <img src="themes/images/webmail_trash.gif" align="absmiddle" /> <b class="txtGreen">{$MOD.LBL_TRASH}</b>
+ <ul style="list-style-type:none;">
+ <li>
+ <img src="themes/images/folder.gif" align="absmiddle" />
+ <a href="#" class="small">{$MOD.LBL_JUNK_MAILS}</a> <b></b>
+ </li>
+ </ul>
+
+ </td>
+ </tr>
+ </table>
+ </td>
<td width="1%"> </td>
- <td rowspan=3>
- <table border=0 width="100%" cellspacing=0 cellspacing=0 class="MatrixLayer1">
- <tr>
+ <td rowspan=3>
+ <table border=0 width="100%" cellspacing=0 cellspacing=0 class="MatrixLayer1">
+ <tr>
<td width="79%" class="big mailSubHeader"><div id="nav"><span style="float:left">{$ACCOUNT} > {$MAILBOX}</span> <span style="float:right">{$NAVIGATION}</span></div></td>
- </tr>
- <tr>
+ </tr>
+ <tr>
<td class="hdrNameBg" style="height:30px;">
<!-- Table to display Delete, Move To and Search buttons and options - Starts -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
@@ -82,8 +134,8 @@
</tr>
</table>
</td>
- </tr>
- <tr>
+ </tr>
+ <tr>
<td align="left" valign="top" style="height:150px;">
<div id="rssScroll" style="height:220px;">
<!--div added to show info while moving mails-->
@@ -103,11 +155,11 @@
{/foreach}
{/foreach}
</table>
- </form>
- </div>
- </td>
-
- </tr>
+ </form>
+ </div>
+ </td>
+
+ </tr>
</table>
</td>
@@ -116,62 +168,17 @@
</td>
</tr>
<tr>
- <td rowspan="5" class="MatrixLayer1" valign="top">
- <img src="themes/images/mymail.gif" align="absmiddle" /> <span style="cursor:pointer;"><b class="txtGreen">{$MOD.LBL_MY_MAILS}</b> <span id="folderOpts" style="position:absolute;display:none">{$MOD.ADD_FOLDER}</span></span>
- <div id="box_list">
- <ul style="list-style-type:none;">
-
- {foreach item=row from=$BOXLIST}
- {foreach item=row_values from=$row}
- {$row_values}
- {/foreach}
- {/foreach}
- </ul></div> <br />
-
- <img src="themes/images/sentmail.gif" align="absmiddle" /> <b class="txtGreen">{$MOD.LBL_SENT_MAILS}</b>
- <ul style="list-style-type:none;">
- <li >
- <img src="themes/images/opened_folder.gif" align="absmiddle" />
- <a href="index.php?module=Emails&action=ListView&parenttab=My Home Page&folderid=1&parenttab=My Home Page" class="small">{$MOD.LBL_ALLMAILS}</a> <b></b>
- </li>
- <li >
- <img src="themes/images/opened_folder.gif" align="absmiddle" />
- <a href="index.php?module=Emails&action=ListView&folderid=2&parenttab=My Home Page" class="small">{$MOD.LBL_TO_CONTACTS}</a> <b></b>
- </li>
- <li >
- <img src="themes/images/opened_folder.gif" align="absmiddle" />
- <a href="index.php?module=Emails&action=ListView&folderid=3&parenttab=My Home Page" class="small">{$MOD.LBL_TO_ACCOUNTS}</a>
- </li>
- <li >
- <img src="themes/images/opened_folder.gif" align="absmiddle" />
- <a href="index.php?module=Emails&action=ListView&folderid=4&parenttab=My Home Page" class="small">{$MOD.LBL_TO_LEADS}</a>
- </li>
- <li >
- <img src="themes/images/opened_folder.gif" align="absmiddle" />
- <a href="index.php?module=Emails&action=ListView&folderid=5&parenttab=My Home Page" class="small">{$MOD.LBL_TO_USERS}</a>
- </li>
- </ul><br />
- <img src="themes/images/webmail_trash.gif" align="absmiddle" /> <b class="txtGreen">{$MOD.LBL_TRASH}</b>
- <ul style="list-style-type:none;">
- <li>
- <img src="themes/images/folder.gif" align="absmiddle" />
- <a href="#" class="small">{$MOD.LBL_JUNK_MAILS}</a> <b></b>
- </li>
- </ul>
-
- </td>
- <td width="1%"> </td>
- </tr>
+ <td width="1%"> </td>
+ </tr>
<tr>
<!-- td style="padding:1px;" align="left" -->
<td width="1%"> </td>
</tr>
<tr><td colspan="2" style="height:10px;"> </td></tr>
- <tr style="visibility:hidden" class="previewWindow">
+ <tr id="preview1" style="visibility:hidden" class="previewWindow">
<td width="1%"> </td>
<!--td class="forwardBg"-->
<td class="forwardBg">
-
<!-- Table to display the Qualify, Reply, Forward, etc buttons - Starts -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
@@ -186,7 +193,6 @@
</tr>
</table>
<!-- Table to display the Qualify, Reply, Forward, etc buttons - Ends -->
-
</td>
</tr>
<tr style="visibility:hidden" class="previewWindow">
@@ -195,10 +201,11 @@
<table width="100%" class="MatrixLayer1" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#FFFFFF" valign="top">
- <!-- Table to display the Header details (From, To, Subject and date) - Ends -->
+ <div id="preview2">
<span id="body_area" style="width:95%">
<iframe id="email_description" width="100%" height="500" scrolling="no" frameBorder="0"></iframe>
</span>
+ </div>
</td>
</tr>
</table>
Modified: vtigercrm/branches/5.0.3/modules/Webmails/ListView.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Webmails/ListView.php (original)
+++ vtigercrm/branches/5.0.3/modules/Webmails/ListView.php Wed May 16 10:11:55 2007
@@ -399,6 +399,8 @@
$folders .= '<li style="padding-left:0px;"><img src="themes/images/'.$img.'"align="absmiddle" /> <a href="javascript:changeMbox(\''.$tmpval.'\');" class="small">'.$tmpval.'</a> <span id="'.$tmpval.'_count" style="font-weight:bold">';
if($unread_msgs > 0)
$folders .= '(<span id="'.$tmpval.'_unread">'.$unread_msgs.'</span>)</span> <span id="remove_'.$tmpval.'" style="position:relative;display:none">Remove</span></li>';
+ else
+ $folders .='</span></li>';
} else {
$box = imap_status($MailBox->mbox, "{".$MailBox->imapServerAddress."}".$tmpval, SA_ALL);
@@ -409,6 +411,8 @@
$folders .= '<li ><img src="themes/images/'.$img.'" align="absmiddle" /> <a href="javascript:changeMbox(\''.$tmpval.'\');" class="small">'.$tmpval.'</a> <span id="'.$tmpval.'_count" style="font-weight:bold">';
if($box->unseen > 0)
$folders .= '(<span id="'.$tmpval.'_unread">'.$box->unseen.'</span>)</span></li>';
+ else
+ $folders .='</span></li>';
}
}
$boxes .= '</select>';
Modified: vtigercrm/branches/5.0.3/modules/Webmails/ListViewAjax.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Webmails/ListViewAjax.php (original)
+++ vtigercrm/branches/5.0.3/modules/Webmails/ListViewAjax.php Wed May 16 10:11:55 2007
@@ -208,9 +208,11 @@
$_SESSION["mailboxes"][$tmpval] = $new_msgs;
if($numEmails==0) {$num=$numEmails;} else {$num=($numEmails-1);}
- $folders .= '<li style="padding-left:0px;"><img src="themes/images/'.$img.'" align="absmiddle" /> <a href="javascript:changeMbox(\''.$tmpval.'\');" class="small">'.$tmpval.'</a> <span id="'.$tmpval.'_count" style="font-weight:bold">';
+ $folders .= '<li style="padding-left:0px;"><img src="themes/images/'.$img.'"align="absmiddle" /> <a href="javascript:changeMbox(\''.$tmpval.'\');" class="small">'.$tmpval.'</a> <span id="'.$tmpval.'_count" style="font-weight:bold">';
if($unread_msgs > 0)
$folders .= '(<span id="'.$tmpval.'_unread">'.$unread_msgs.'</span>)</span> <span id="remove_'.$tmpval.'" style="position:relative;display:none">Remove</span></li>';
+ else
+ $folders .='</span></li>';
} else {
$box = imap_status($MailBox->mbox, "{".$MailBox->imapServerAddress."}".$tmpval, SA_ALL);
@@ -221,6 +223,8 @@
$folders .= '<li ><img src="themes/images/'.$img.'" align="absmiddle" /> <a href="javascript:changeMbox(\''.$tmpval.'\');" class="small">'.$tmpval.'</a> <span id="'.$tmpval.'_count" style="font-weight:bold">';
if($box->unseen > 0)
$folders .= '(<span id="'.$tmpval.'_unread">'.$box->unseen.'</span>)</span></li>';
+ else
+ $folders .='</span></li>';
}
}
$boxes .= '</select>';
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 Wed May 16 10:11:55 2007
@@ -58,7 +58,7 @@
if($msg_ob->has_attachments)
$flags.='<a href="javascript:;" onclick="displayAttachments('.$num.');"><img src="modules/Webmails/images/stock_attach.png" border="0" width="14px" height="14" title="Attachment"></a> ';
else
- $flags.='<img src="modules/Webmails/images/blank.png" border="0" width="14px" height="14" alt=""> ';
+ $flags.='<img src="themes/images/blank.gif" border="0" width="14px" height="14" alt=""> ';
@@ -99,7 +99,7 @@
if ($mails[$start_message]->deleted)
{
- $listview_entries[$num][] = '<td nowrap align="left" style="cursor:pointer;" id="deleted_subject_'.$num.'" onclick="load_webmail(\''.$num.'\');"><s><a href="javascript:;" >'.substr($mails[$start_message]->subject,0,50).'</a></s></td>';
+ $listview_entries[$num][] = '<td nowrap align="left" style="cursor:pointer;" id="deleted_subject_'.$num.'" onclick="load_webmail(\''.$num.'\');"><s><a href="javascript:;" >'.substr($mails[$start_message]->subject,0,40).'</a></s></td>';
$listview_entries[$num][] = '<td nowrap align="left" style="cursor:pointer;" onClick="load_webmail(\''.$num.'\');" nowrap id="deleted_date_'.$num.'"><s>'.substr($mails[$start_message]->date,0,30).'</s></td>';
$listview_entries[$num][] = '<td nowrap align="left" id="deleted_from_'.$num.'" style="cursor:pointer;" onClick="load_webmail(\''.$num.'\');"><s>'.substr($from,0,20).'</s></td>';
}
@@ -132,7 +132,7 @@
//Option 2 - Ends
//Added to shown the original UTF-8 characters - Mickie - 30-11-06 - Ends
- $listview_entries[$num][] = '<td nowrap align="left" onclick="load_webmail(\''.$num.'\');" style="cursor:pointer;" ><a href="javascript:;" id="ndeleted_subject_'.$num.'">'.substr($mails[$start_message]->subject,0,45).'</a></td>';
+ $listview_entries[$num][] = '<td nowrap align="left" onclick="load_webmail(\''.$num.'\');" style="cursor:pointer;" ><a href="javascript:;" id="ndeleted_subject_'.$num.'">'.substr($mails[$start_message]->subject,0,40).'</a></td>';
$listview_entries[$num][] = '<td npwrap align="left" nowrap id="ndeleted_date_'.$num.'" style="cursor:pointer;" onClick="load_webmail(\''.$num.'\');" >'.substr($mails[$start_message]->date,0,30).'</td>';
$listview_entries[$num][] = '<td nowrap align="left" id="ndeleted_from_'.$num.'" style="cursor:pointer;" onClick="load_webmail(\''.$num.'\');" >'.substr($from,0,20).'</td>';
}
Modified: vtigercrm/branches/5.0.3/modules/Webmails/Webmails.js
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Webmails/Webmails.js (original)
+++ vtigercrm/branches/5.0.3/modules/Webmails/Webmails.js Wed May 16 10:11:55 2007
@@ -9,6 +9,7 @@
********************************************************************************/
function load_webmail(mid) {
var node = $("row_"+mid);
+ preview_id = mid;
if(typeof($('fnt_subject_'+mid)) != "undefined" && $('fnt_subject_'+mid).color=="green")
{
$('fnt_subject_'+mid).color="";
@@ -31,7 +32,7 @@
$("unread_img_"+mid).removeChild($("unread_img_"+mid).firstChild);
$("unread_img_"+mid).appendChild(Builder.node('a',
- {href: 'javascript:;', onclick: 'OpenComposer('+mid+',"reply")'},
+ {href: 'javascript:;', onclick: 'OpenComposer('+mid+',\'reply\')'},
[Builder.node('img',{src: 'themes/images/openmail.jpg', border: '0', width: '12', height: '12'})]
));
}
@@ -60,7 +61,11 @@
tmp[i].style.visibility="visible";
}
}
-
+ if($("preview1").style.visibility === "hidden" || $("preview2").style.visibility === "hidden") {
+ $("preview1").style.visibility="visible";
+ $("preview2").style.visibility="visible";
+ }
+
$("delete_button").removeChild($("delete_button").firstChild);
$("delete_button").appendChild(Builder.node('input',{type: 'button', name: 'Button', value: 'Delete', className: 'buttonok', onclick: 'runEmailCommand(\'delete_msg\','+mid+')'}));
@@ -570,8 +575,13 @@
new Effect.Fade(row,{queue: {position: 'end', scope: 'effect'},duration: '0.5'});
tmp = document.getElementsByClassName("previewWindow");
- tmp[0].style.visibility="hidden";
+ // tmp[0].style.visibility="hidden";
}catch(g){}
+ if(preview_id == id){
+ // alert(preview_id + id);
+ $("preview1").style.visibility="hidden";
+ $("preview2").style.visibility="hidden";
+ }
/*for(var i=0;i<tmp.length;i++) {
if(tmp[i].style.visibility === "visible") {
tmp[i].style.visibility="hidden";
@@ -609,14 +619,16 @@
);
$("del_link_"+id).innerHTML = '<a href="javascript:void(0);" onclick="runEmailCommand(\'undelete_msg\','+id+');"><img src="modules/Webmails/images/gnome-fs-trash-full.png" border="0" width="14" height="14" alt="del"></a>';
-
- new Effect.Fade(row,{queue: {position: 'end', scope: 'effect'},duration: '1.0'});
- tmp = document.getElementsByClassName("previewWindow");
- for(var i=0;i<tmp.length;i++) {
- if(tmp[i].style.visibility === "visible") {
- tmp[i].style.visibility="hidden";
- }
+ if($("row_"+id)){
+ new Effect.Fade(row,{queue: {position: 'end', scope: 'effect'},duration: '1.0'});
+ }
+
+ if(preview_id == id){
+ // alert(preview_id + id);
+ $("preview1").style.visibility="hidden";
+ $("preview2").style.visibility="hidden";
}
+
runEmailCommand("reload",0);
break;
case 'undelete_msg':
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 Wed May 16 10:11:55 2007
@@ -55,21 +55,21 @@
<!-- 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><td width="20%" align="right"><b><?php echo $mod_strings['LBL_FROM'];?></b></td><td id="from_addy"><?php echo $from;?></td></tr>
- <tr><td width="20%" align="right"><b><?php echo $mod_strings['LBL_TO'];?></b></td><td id="to_addy"><?php echo $to;?></td></tr>
-<tr><td width="20%" align="right"><b><?php echo $mod_strings['LBL_CC'];?></b></td><td id="webmail_cc"><?php echo $cc;?></td></tr>
+ <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><td align="right"><b><?php echo $mod_strings['LBL_SUBJECT'];?></b></td><td id="webmail_subject"><?php echo $subject;?></td></tr>
- <tr><td align="right"><b><?php echo $mod_strings['LBL_DATE'];?></b></td><td id="webmail_date"><?php echo $date;?></td>
+ <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;?>
<?php if(!$_REQUEST['fullview']) {?>
- <td id="full_view" nowrap><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></td>
<?php } ?>
<tr>
<?php if($_REQUEST['fullview'] && $email->has_attachments) {?>
- <td align="right"><b><?php echo $mod_strings['LBL_ATTACHMENT'];?>:</b></td><td id="webmail_attachment"><?php echo $attachment_links;?></td>
+ <td align="left"><b><?php echo $mod_strings['LBL_ATTACHMENT'];?>:</b><?php echo $attachment_links;?></td>
<?php } ?>
</tr>
- <tr><td align="right" style="border-bottom:1px solid #666666;" colspan="3"> </td></tr>
+ <tr><td align="left" style="border-bottom:1px solid #666666;" colspan="3"> </td></tr>
</table>
<!-- Table to display the Header details (From, To, Subject and date) - Ends -->
More information about the vtigercrm-commits
mailing list