[ Index ] |
|
Code source de vtiger CRM 5.0.2 |
1 /********************************************************************************* 2 3 ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 4 * ("License"); You may not use this file except in compliance with the License 5 * The Original Code is: vtiger CRM Open Source 6 * The Initial Developer of the Original Code is vtiger. 7 * Portions created by vtiger are Copyright (C) vtiger. 8 * All Rights Reserved. 9 ********************************************************************************/ 10 //added by raju for emails 11 12 function eMail(module,oButton) 13 { 14 var select_options = document.getElementsByName('selected_id'); 15 var x = select_options.length; 16 var viewid =getviewId(); 17 var idstring= new Array(); 18 19 xx = 0; 20 for(i = 0; i < x ; i++) 21 { 22 if(select_options[i].checked) 23 { 24 idstring[xx] = select_options[i].value; 25 xx++ 26 } 27 } 28 if (xx != 0) 29 { 30 document.getElementById('idlist').value=idstring.join(':'); 31 } 32 else 33 { 34 alert("Please select at least one entity"); 35 return false; 36 } 37 allids = document.getElementById('idlist').value; 38 fnvshobj(oButton,'sendmail_cont'); 39 sendmail(module,allids); 40 } 41 42 43 function massMail(module) 44 { 45 46 var select_options = document.getElementsByName('selected_id'); 47 x = select_options.length; 48 var viewid =getviewId(); 49 idstring = ""; 50 51 xx = 0; 52 for(i = 0; i < x ; i++) 53 { 54 if(select_options[i].checked) 55 { 56 idstring = select_options[i].value +";"+idstring 57 xx++ 58 } 59 } 60 if (xx != 0) 61 { 62 document.getElementById('idlist').value=idstring; 63 } 64 else 65 { 66 alert("Please select at least one entity"); 67 return false; 68 } 69 document.massdelete.action="index.php?module=CustomView&action=SendMailAction&return_module="+module+"&return_action=index&viewname="+viewid; 70 } 71 72 //added by rdhital for better emails 73 function set_return_emails(entity_id,email_id,parentname,emailadd){ 74 if(emailadd != '') 75 { 76 window.opener.document.EditView.parent_id.value = window.opener.document.EditView.parent_id.value+entity_id+'@'+email_id+'|'; 77 window.opener.document.EditView.parent_name.value = window.opener.document.EditView.parent_name.value+parentname+'<'+emailadd+'>; '; 78 window.opener.document.EditView.hidden_toid.value = emailadd+','+window.opener.document.EditView.hidden_toid.value; 79 window.close(); 80 }else 81 { 82 alert('The Record '+parentname+' does\'t have email id' ); 83 return false; 84 } 85 } 86 //added by raju for emails 87 88 function validate_sendmail(idlist,module) 89 { 90 var j=0; 91 var chk_emails = document.SendMail.elements.length; 92 var oFsendmail = document.SendMail.elements 93 email_type = new Array(); 94 for(var i=0 ;i < chk_emails ;i++) 95 { 96 if(oFsendmail[i].type != 'button') 97 { 98 if(oFsendmail[i].checked != false) 99 { 100 email_type [j++]= oFsendmail[i].value; 101 } 102 } 103 } 104 if(email_type != '') 105 { 106 var field_lists = email_type.join(':'); 107 var url= 'index.php?module=Emails&action=EmailsAjax&pmodule='+module+'&file=EditView&sendmail=true&idlist='+idlist+'&field_lists='+field_lists; 108 openPopUp('xComposeEmail',this,url,'createemailWin',820,689,'menubar=no,toolbar=no,location=no,status=no,resizable=no'); 109 fninvsh('roleLay'); 110 return true; 111 } 112 else 113 { 114 alert('Please Select a mailid'); 115 } 116 } 117 function sendmail(module,idstrings) 118 { 119 new Ajax.Request( 120 'index.php', 121 {queue: {position: 'end', scope: 'command'}, 122 method: 'post', 123 postBody: "module=Emails&return_module="+module+"&action=EmailsAjax&file=mailSelect&idlist="+idstrings, 124 onComplete: function(response) { 125 getObj('sendmail_cont').innerHTML=response.responseText; 126 } 127 } 128 ); 129 } 130 131
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 10:22:19 2007 | par Balluche grâce à PHPXref 0.7 |