[Vtigercrm-commits] [vtiger-commits] r6615 - in /vtigercrm/trunk: Smarty/templates/DetailViewUI.tpl Smarty/templates/ListView.tpl include/js/general.js modules/Accounts/DetailView.php modules/Contacts/DetailView.php modules/Leads/DetailView.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Sun May 28 08:51:16 EDT 2006
Author: mmbrich
Date: Sun May 28 06:51:14 2006
New Revision: 6615
Log:
internal mailer for detail view in accounts, contacts and leads... Added InternalMailer() function to general.js
Modified:
vtigercrm/trunk/Smarty/templates/DetailViewUI.tpl
vtigercrm/trunk/Smarty/templates/ListView.tpl
vtigercrm/trunk/include/js/general.js
vtigercrm/trunk/modules/Accounts/DetailView.php
vtigercrm/trunk/modules/Contacts/DetailView.php
vtigercrm/trunk/modules/Leads/DetailView.php
Modified: vtigercrm/trunk/Smarty/templates/DetailViewUI.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/DetailViewUI.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/DetailViewUI.tpl Sun May 28 06:51:14 2006
@@ -13,7 +13,12 @@
</div>
</td>
{elseif $keyid eq '13'} <!--Email-->
- <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}"><div id="dtlview_{$label}" onClick="hndMouseOver({$keyid},'{$label}');"><a href="mailto:{$keyval}" target="_blank"> {$keyval}</a></div>
+ <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}"><div id="dtlview_{$label}" onClick="hndMouseOver({$keyid},'{$label}');">
+ {if $INT_MAILER eq 'true'}
+ <a href="javascript:InternalMailer('{$keyval}','email_addy');"> {$keyval}</a></div>
+ {else}
+ <a href="mailto:{$keyval}" target="_blank"> {$keyval}</a></div>
+ {/if}
<div id="editarea_{$label}" style="display:none;">
<input class="detailedViewTextBox" onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'" type="text" id="txtbox_{$label}" name="{$keyfldname}" maxlength='100' value="{$keyval}"></input>
<br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');hide('crmspanid');"/> or
@@ -185,4 +190,3 @@
{else}
<td class="dvtCellInfo" align="left" width=25%">{$keyval}</td>
{/if}
-
Modified: vtigercrm/trunk/Smarty/templates/ListView.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/ListView.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/ListView.tpl Sun May 28 06:51:14 2006
@@ -420,18 +420,6 @@
ajaxObj.process("index.php?",urlstring);
}
-function InternalMailer(record_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';
- break;
- }
-
- var opts = "menubar=no,toolbar=no,location=no,status=no,resizable=yes,scrollbars=yes";
- openPopUp('xComposeEmail',this,url,'createemailWin',830,662,opts);
-}
-
</script>
{/literal}
Modified: vtigercrm/trunk/include/js/general.js
==============================================================================
--- vtigercrm/trunk/include/js/general.js (original)
+++ vtigercrm/trunk/include/js/general.js Sun May 28 06:51:14 2006
@@ -1576,4 +1576,19 @@
window.onload = fnc;
}
}
-
+function InternalMailer(record_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';
+ break;
+ case 'email_addy':
+ url = 'index.php?module=Emails&action=EmailsAjax&internal_mailer=true&type='+type+'&record=&email_addy='+record_id+'&file=EditView';
+ break;
+
+ }
+
+ var opts = "menubar=no,toolbar=no,location=no,status=no,resizable=yes,scrollbars=yes";
+ openPopUp('xComposeEmail',this,url,'createemailWin',830,662,opts);
+}
+
Modified: vtigercrm/trunk/modules/Accounts/DetailView.php
==============================================================================
--- vtigercrm/trunk/modules/Accounts/DetailView.php (original)
+++ vtigercrm/trunk/modules/Accounts/DetailView.php Sun May 28 06:51:14 2006
@@ -69,6 +69,9 @@
$category = getParentTab();
$smarty->assign("CATEGORY",$category);
+if(useInternalMailer() == 1)
+ $smarty->assign("INT_MAILER","true");
+
if(isPermitted("Accounts","EditView",$_REQUEST['record']) == 'yes')
$smarty->assign("EDIT_DUPLICATE","permitted");
Modified: vtigercrm/trunk/modules/Contacts/DetailView.php
==============================================================================
--- vtigercrm/trunk/modules/Contacts/DetailView.php (original)
+++ vtigercrm/trunk/modules/Contacts/DetailView.php Sun May 28 06:51:14 2006
@@ -63,6 +63,9 @@
$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']);
$smarty->assign("UPDATEINFO",updateInfo($focus->id));
+if(useInternalMailer() == 1)
+ $smarty->assign("INT_MAILER","true");
+
$smarty->assign("NAME",$focus->lastname.' '.$focus->firstname);
$log->info("Detail Block Informations successfully retrieved.");
Modified: vtigercrm/trunk/modules/Leads/DetailView.php
==============================================================================
--- vtigercrm/trunk/modules/Leads/DetailView.php (original)
+++ vtigercrm/trunk/modules/Leads/DetailView.php Sun May 28 06:51:14 2006
@@ -65,6 +65,9 @@
$smarty->assign("BLOCKS", getBlocks($currentModule,"detail_view",'',$focus->column_fields));
$smarty->assign("CUSTOMFIELD", $cust_fld);
+if(useInternalMailer() == 1)
+ $smarty->assign("INT_MAILER","true");
+
$val = isPermitted("Leads","EditView",$_REQUEST['record']);
More information about the vtigercrm-commits
mailing list