[Vtigercrm-commits] [vtiger-commits] r11139 - in /vtigercrm/branches/5.0.3: Smarty/templates/ComposeEmail.tpl modules/Webmails/Webmails.js

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Tue May 29 16:10:18 EDT 2007


Author: richie
Date: Tue May 29 14:10:13 2007
New Revision: 11139

Log:
* Fixed the cc and bcc trim issue

Modified:
    vtigercrm/branches/5.0.3/Smarty/templates/ComposeEmail.tpl
    vtigercrm/branches/5.0.3/modules/Webmails/Webmails.js

Modified: vtigercrm/branches/5.0.3/Smarty/templates/ComposeEmail.tpl
==============================================================================
--- vtigercrm/branches/5.0.3/Smarty/templates/ComposeEmail.tpl (original)
+++ vtigercrm/branches/5.0.3/Smarty/templates/ComposeEmail.tpl Tue May 29 14:10:13 2007
@@ -187,7 +187,7 @@
                                         return false;
                                 }
                         }
-                        else if(arr[i] != "" && !/^[a-z0-9]([a-z0-9_\-\.]*)@([a-z0-9_\-\.]*)(\.[a-z]{2,3}(\.[a-z]{2}){0,2})$/.test(arr[i]))
+                        else if(trim(arr[i]) != "" && !/^[a-z0-9]([a-z0-9_\-\.]*)@([a-z0-9_\-\.]*)(\.[a-z]{2,3}(\.[a-z]{2}){0,2})$/.test(trim(arr[i])))
                         {
                                 alert(cc_err_msg+": "+arr[i]);
                                 return false;
@@ -203,7 +203,7 @@
 		arr = str.split(",");
 		for(var i=0; i<=arr.length-1; i++)
 		{
-			if(arr[i] != "" && !/^[a-z0-9]([a-z0-9_\-\.]*)@([a-z0-9_\-\.]*)(\.[a-z]{2,3}(\.[a-z]{2}){0,2})$/.test(arr[i]))
+			if(trim(arr[i]) != "" && !/^[a-z0-9]([a-z0-9_\-\.]*)@([a-z0-9_\-\.]*)(\.[a-z]{2,3}(\.[a-z]{2}){0,2})$/.test(trim(arr[i])))
 			{
 				alert(bcc_err_msg+": "+arr[i]);
 				return false;	

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 Tue May 29 14:10:13 2007
@@ -599,6 +599,8 @@
                                     case 'delete_msg':
 					//id=resp;
 					eval(resp);
+				if($("row_"+id))
+				{
                                         var row = $("row_"+id);
 					if(row.className == "unread_email") {
 						var unread  = parseInt($(mailbox+"_unread").innerHTML);
@@ -621,9 +623,9 @@
                                         );
 
                                         $("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>';
-					if($("row_"+id)){
 	                                        new Effect.Fade(row,{queue: {position: 'end', scope: 'effect'},duration: '1.0'});
-					}
+				}
+					
 									
 					if(preview_id == id){
                                         //      alert(preview_id + id);





More information about the vtigercrm-commits mailing list