[Vtigercrm-commits] [vtiger-commits] r6613 - in /vtigercrm/trunk: Smarty/templates/ListView.tpl include/utils/ListViewUtils.php include/utils/utils.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Sun May 28 08:13:41 EDT 2006
Author: mmbrich
Date: Sun May 28 06:13:40 2006
New Revision: 6613
Log:
starting functionality for internal mailer and listview entites
Modified:
vtigercrm/trunk/Smarty/templates/ListView.tpl
vtigercrm/trunk/include/utils/ListViewUtils.php
vtigercrm/trunk/include/utils/utils.php
Modified: vtigercrm/trunk/Smarty/templates/ListView.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/ListView.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/ListView.tpl Sun May 28 06:13:40 2006
@@ -420,6 +420,18 @@
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='+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/utils/ListViewUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/ListViewUtils.php (original)
+++ vtigercrm/trunk/include/utils/ListViewUtils.php Sun May 28 06:13:40 2006
@@ -1001,7 +1001,10 @@
}
elseif($uitype == 13)
{
- $value = '<a href="mailto:'.$temp_val.'">'.$temp_val.'</a>';
+ if(useInternalMailer() == 1)
+ $value = '<a href="javascript:InternalMailer('.$entity_id.',\'record_id\')">'.$temp_val.'</a>';
+ else
+ $value = '<a href="mailto:'.$temp_val.'">'.$temp_val.'</a>';
}
elseif($uitype == 56)
{
Modified: vtigercrm/trunk/include/utils/utils.php
==============================================================================
--- vtigercrm/trunk/include/utils/utils.php (original)
+++ vtigercrm/trunk/include/utils/utils.php Sun May 28 06:13:40 2006
@@ -2248,5 +2248,8 @@
return $text;
}
-
+function useInternalMailer() {
+ global $current_user,$adb;
+ return $adb->query_result($adb->query("select int_mailer from mail_accounts where user_id='".$current_user->id."'"),0,"int_mailer");
+}
?>
More information about the vtigercrm-commits
mailing list