[Vtigercrm-commits] [vtiger-commits] r5832 - in /vtigercrm/trunk/modules/Emails: Email.js ListView.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Wed May 10 09:20:03 EDT 2006


Author: richie
Date: Wed May 10 07:19:58 2006
New Revision: 5832

Log:
Multiple mailids option enabled for outgoing emails

Modified:
    vtigercrm/trunk/modules/Emails/Email.js
    vtigercrm/trunk/modules/Emails/ListView.php

Modified: vtigercrm/trunk/modules/Emails/Email.js
==============================================================================
--- vtigercrm/trunk/modules/Emails/Email.js (original)
+++ vtigercrm/trunk/modules/Emails/Email.js Wed May 10 07:19:58 2006
@@ -22,7 +22,6 @@
 
         x = document.massdelete.selected_id.length;
         idstring = "";
-
         if ( x == undefined)
         {
 
@@ -62,15 +61,20 @@
 			show("status");
 			var ajaxObj = new Ajax(ajaxSaveResponse);
 			var urlstring ="module=Users&action=massdelete&return_module=Emails&idlist="+idstring;
-		    	ajaxObj.process("index.php?",urlstring);
+		    ajaxObj.process("index.php?",urlstring);
 		}
 		else
 		{
 			return false;
 		}
 }
+function ShowFolders(folder)
+{
+	var ajaxObj = new Ajax(ajaxSaveResponse);
+	var urlstring ="module=Emails&ajax=true&action=EmailsAjax&file=ListView&folder="+folder;
+	ajaxObj.process("index.php?",urlstring);
+}
 
 
 
 
-

Modified: vtigercrm/trunk/modules/Emails/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Emails/ListView.php (original)
+++ vtigercrm/trunk/modules/Emails/ListView.php Wed May 10 07:19:58 2006
@@ -27,13 +27,12 @@
 require_once('include/logging.php');
 require_once('include/utils/utils.php');
 require_once('modules/CustomView/CustomView.php');
-
 global $current_user;
-$submenu = array('LBL_EMAILS_TITLE'=>'index.php?module=Emails&action=ListView.php','LBL_WEBMAILS_TITLE'=>'index.php?module=Webmails&action=index&parenttab=My Home Page');
-
-$sec_arr = array('index.php?module=Emails&action=ListView.php'=>'Emails','index.php?module=Webmails&action=index&parenttab=parenttab=My Home Page'=>'Emails'); 
-
-if($_REQUEST['ajax'] == '')
+//$submenu = array('LBL_EMAILS_TITLE'=>'index.php?module=Emails&action=ListView.php','LBL_WEBMAILS_TITLE'=>'index.php?module=Webmails&action=index&parenttab=My Home Page');
+
+//$sec_arr = array('index.php?module=Emails&action=ListView.php'=>'Emails','index.php?module=Webmails&action=index&parenttab=parenttab=My Home Page'=>'Emails');
+
+/*if($_REQUEST['ajax'] == '')
 {
 
 	if(isset($_REQUEST['smodule']) && $_REQUEST['smodule'] != '')
@@ -73,7 +72,7 @@
 		}
 
 	}
-}
+}*/
 global $app_strings;
 global $mod_strings;
 
@@ -113,9 +112,10 @@
 
 //<<<<cutomview>>>>>>>
 $oCustomView = new CustomView("Emails");
-$viewid = $oCustomView->getViewId($currentModule);
+$viewid = 20;
 $customviewcombo_html = $oCustomView->getCustomViewCombo($viewid);
 $viewnamedesc = $oCustomView->getCustomViewByCvid($viewid);
+
 //<<<<<customview>>>>>
 
 // Buttons and View options
@@ -158,19 +158,33 @@
 }
 //<<<<<<<<customview>>>>>>>>>
 
-
 if(isset($where) && $where != '')
 {
 	$list_query .= " AND " .$where;
 }
-
+if($_REQUEST['folder'] =='Contacts')
+{
+	$list_query .= "AND seactivityrel.crmid in (select contactid from contactdetails)";
+}
+if($_REQUEST['folder'] =='Accounts')
+{
+	$list_query .= "AND seactivityrel.crmid in (select accountid from account)";	
+}
+if($_REQUEST['folder'] =='Leads')
+{
+	$list_query .= "AND seactivityrel.crmid in (select leadid from leaddetails)";	
+}
+if($_REQUEST['folder'] =='Users')
+{
+	$list_query .= "AND seactivityrel.crmid in (select id from users)";	
+}
 if(isset($order_by) && $order_by != '')
 {
 	$tablename = getTableNameForField('Emails',$order_by);
 	$tablename = (($tablename != '')?($tablename."."):'');
-
-        $list_query .= ' ORDER BY '.$tablename.$order_by.' '.$sorder;
-}
+    $list_query .= ' ORDER BY '.$tablename.$order_by.' '.$sorder;
+}
+
 $list_result = $adb->query($list_query);
 
 //Constructing the list view
@@ -221,7 +235,8 @@
 $listview_header = getSearchListHeaderValues($focus,"Emails",$url_string,$sorder,$order_by,"",$oCustomView);
 $smarty->assign("SEARCHLISTHEADER",$listview_header_search);
 $listview_entries = getListViewEntries($focus,"Emails",$list_result,$navigation_array,"","","EditView","Delete",$oCustomView);
-$smarty->assign("LISTENTITY", $listview_entries);                                                                          $smarty->assign("SELECT_SCRIPT", $view_script);
+$smarty->assign("LISTENTITY", $listview_entries);                                                  
+$smarty->assign("SELECT_SCRIPT", $view_script);
 
 $navigationOutput = getTableHeaderNavigation($navigation_array,$url_string,"Emails","index",$viewid);
 $alphabetical = AlphabeticalSearch($currentModule,'index','subject','true','basic',"","","","",$viewid);
@@ -232,7 +247,9 @@
 
 $check_button = Button_Check($module);
 $smarty->assign("CHECK", $check_button);
-
+if($_REQUEST['ajax'] != '')
+	$smarty->display("EmailContents.tpl");
+else
 	$smarty->display("Emails.tpl");
 
 ?>





More information about the vtigercrm-commits mailing list