[Vtigercrm-commits] [vtiger-commits] r6411 - in /vtigercrm/trunk: Smarty/templates/Webmails.tpl modules/Webmails/ListView.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu May 25 08:37:15 EDT 2006
Author: mmbrich
Date: Thu May 25 06:37:13 2006
New Revision: 6411
Log:
move messages feature
Modified:
vtigercrm/trunk/Smarty/templates/Webmails.tpl
vtigercrm/trunk/modules/Webmails/ListView.php
Modified: vtigercrm/trunk/Smarty/templates/Webmails.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/Webmails.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/Webmails.tpl Thu May 25 06:37:13 2006
@@ -102,7 +102,7 @@
<td> </td>
<td class="delBg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
- <td width="45%"><input type="button" name="Button2" value=" {$MOD.LBL_MOVE_TO} " class="classWebBtn"/> {$FOLDER_SELECT}
+ <td width="45%"><input type="button" name="Button2" value=" {$MOD.LBL_MOVE_TO} " class="classWebBtn" onclick="move_messages();"/> {$FOLDER_SELECT}
</td>
<td width="75%" align="right">
<font color="#000000">{$APP.LBL_SEARCH}</font> <input type="text" name="srch" class="importBox" />
@@ -199,9 +199,11 @@
case 'reply':
url = 'index.php?module=Webmails&action=EditView&record='+id+'&reply=true';
break;
+ case 'attachments':
+ url = 'index.php?module=Webmails&action=dlAttachments&mailid='+id;
+ break;
{rdelim}
- openPopUp('xComposeEmail',this,url,'createemailWin',820,652,'menubar=no,toolbar=no,location=no,status=no,resizable=no');
+ openPopUp('xComposeEmail',this,url,'createemailWin',820,652,'menubar=no,toolbar=no,location=no,status=no,resizable=yes,scrollbars=yes');
{rdelim}
</script>
-
<!-- END -->
Modified: vtigercrm/trunk/modules/Webmails/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/ListView.php (original)
+++ vtigercrm/trunk/modules/Webmails/ListView.php Thu May 25 06:37:13 2006
@@ -68,6 +68,29 @@
else
new Effect.Fade(els[i],{queue:{position:'end',scope:'effect',limit:'1'}});
}
+}
+function move_messages() {
+ var els = document.getElementsByTagName("INPUT");
+ var cnt = (els.length-1);
+ for(var i=cnt;i>0;i--) {
+ if(els[i].type === "checkbox" && els[i].name.indexOf("_")) {
+ if(els[i].checked) {
+ var nid = els[i].name.substr((els[i].name.indexOf("_")+1),els[i].name.length);
+ var mvmbox = $("mailbox_select").value;
+ new Ajax.Request(
+ 'index.php',
+ {queue: {position:'end', scope: 'command', limit:1},
+ method: 'post',
+ postBody: 'module=Webmails&action=ListView&mailbox=INBOX&command=move_msg&ajax=true&mailid='+nid+'&mvbox='+mvmbox,
+ onComplete: function(t) {
+ //alert(t.responseText);
+ }
+ }
+ );
+ }
+ }
+ }
+ runEmailCommand('expunge','');
}
</script>
<?php
@@ -236,6 +259,13 @@
exit();
}
+if($_POST["command"] == "move_msg" && $_POST["ajax"] == "true") {
+ imap_mail_move($mbox,$_REQUEST["mailid"],$_REQUEST["mvbox"]);
+ imap_close($mbox);
+ echo "SUCCESS";
+ flush();
+ exit();
+}
function SureRemoveDir($dir) {
if(!$dh = @opendir($dir)) return;
@@ -382,12 +412,13 @@
?>
<?
$navigationOutput = getTableHeaderNavigation($navigation_array,'&parenttab=My%20Home%20Page&mailbox='.$mailbox,"Webmails","index",$viewid);
+
$navigationOutput .= '<td size="10%"> </td><td align="right"><a href="index.php?module=Webmails&action=index&'.$defaultParams.'">Check for new e-Mails</a></td>';
$list = imap_getmailboxes($mbox, "{".$imapServerAddress."}", "*");
sort($list);
if (is_array($list)) {
- $boxes = '<select name="mailbox">';
+ $boxes = '<select name="mailbox" id="mailbox_select">';
foreach ($list as $key => $val) {
$tmpval = preg_replace(array("/\{.*?\}/i"),array(""),$val->name);
if(preg_match("/trash/i",$tmpval))
More information about the vtigercrm-commits
mailing list