[Vtigercrm-commits] [vtiger-commits] r10631 - in /vtigercrm/branches/5.0.3: include/js/general.js include/utils/ListViewUtils.php modules/Emails/EditView.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Apr 11 04:52:56 EDT 2007
Author: saraj
Date: Wed Apr 11 02:52:46 2007
New Revision: 10631
Log:
* Fixed the issue with compose mail when we click on a mail id, Fixes #3454#3482#3510
Modified:
vtigercrm/branches/5.0.3/include/js/general.js
vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php
vtigercrm/branches/5.0.3/modules/Emails/EditView.php
Modified: vtigercrm/branches/5.0.3/include/js/general.js
==============================================================================
--- vtigercrm/branches/5.0.3/include/js/general.js (original)
+++ vtigercrm/branches/5.0.3/include/js/general.js Wed Apr 11 02:52:46 2007
@@ -1567,11 +1567,11 @@
window.onload = fnc;
}
}
-function InternalMailer(record_id,type) {
+function InternalMailer(record_id,field_id,type) {
var url;
switch(type) {
case 'record_id':
- url = 'index.php?module=Emails&action=EmailsAjax&internal_mailer=true&type='+type+'&record=&rec_id='+record_id+'&file=EditView';
+ url = 'index.php?module=Emails&action=EmailsAjax&internal_mailer=true&type='+type+'&record=&field_id='+field_id+'&rec_id='+record_id+'&file=EditView';//query string field_id added for listview-compose email issue
break;
case 'email_addy':
url = 'index.php?module=Emails&action=EmailsAjax&internal_mailer=true&type='+type+'&record=&email_addy='+record_id+'&file=EditView';
Modified: vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php (original)
+++ vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php Wed Apr 11 02:52:46 2007
@@ -1119,7 +1119,13 @@
elseif($uitype == 13 || $uitype == 104)
{
if(useInternalMailer() == 1)
- $value = '<a href="javascript:InternalMailer('.$entity_id.',\'record_id\')">'.$temp_val.'</a>';
+ {
+ $querystr="SELECT fieldid FROM vtiger_field WHERE tabid=".getTabid($module)." and uitype=13;";
+ $queryres = $adb->query($querystr);
+ //Change this index 0 - to get the vtiger_fieldid based on email1 or email2
+ $fieldid = $adb->query_result($queryres,0,'fieldid');
+ $value = '<a href="javascript:InternalMailer('.$entity_id.','.$fieldid.',\'record_id\')">'.$temp_val.'</a>';
+ }
else
$value = '<a href="mailto:'.$field_val.'">'.$temp_val.'</a>';
}
Modified: vtigercrm/branches/5.0.3/modules/Emails/EditView.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Emails/EditView.php (original)
+++ vtigercrm/branches/5.0.3/modules/Emails/EditView.php Wed Apr 11 02:52:46 2007
@@ -85,7 +85,11 @@
$smarty->assign('INT_MAILER',"true");
$rec_type = $_REQUEST["type"];
$rec_id = $_REQUEST["rec_id"];
-
+ //added for getting list-ids to compose email popup from list view(Accounts,Contacts,Leads)
+ if(isset($_REQUEST['field_id']) && strlen($_REQUEST['field_id']) != 0) {
+ $id_list = $_REQUEST['rec_id'].'@'.$_REQUEST['field_id'].'|';
+ $smarty->assign("IDLISTS", $id_list);
+ }
if($rec_type == "record_id") {
$rs = $adb->query("select setype from vtiger_crmentity where crmid='".$rec_id."'");
$type = $adb->query_result($rs,0,'setype');
@@ -195,7 +199,6 @@
$smarty->assign("MODULE",$currentModule);
$smarty->assign("SINGLE_MOD",$app_strings['Email']);
-
//needed when creating a new email with default values passed in
if (isset($_REQUEST['contact_name']) && is_null($focus->contact_name))
{
More information about the vtigercrm-commits
mailing list