[Vtigercrm-commits] [vtiger-commits] r6076 - in /vtigercrm/branches/5.0_postgresql_integration: data/CRMEntity.php include/js/ListView.js include/utils/ListViewUtils.php modules/Activities/Activity.php modules/Activities/Save.php schema/DatabaseSchema.xml
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue May 16 12:07:59 EDT 2006
Author: jeffk
Date: Tue May 16 10:07:48 2006
New Revision: 6076
Log:
refs #752. merge trunk changesets [6069] through [6075]
Modified:
vtigercrm/branches/5.0_postgresql_integration/data/CRMEntity.php
vtigercrm/branches/5.0_postgresql_integration/include/js/ListView.js
vtigercrm/branches/5.0_postgresql_integration/include/utils/ListViewUtils.php
vtigercrm/branches/5.0_postgresql_integration/modules/Activities/Activity.php
vtigercrm/branches/5.0_postgresql_integration/modules/Activities/Save.php
vtigercrm/branches/5.0_postgresql_integration/schema/DatabaseSchema.xml
Modified: vtigercrm/branches/5.0_postgresql_integration/data/CRMEntity.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/data/CRMEntity.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/data/CRMEntity.php Tue May 16 10:07:48 2006
@@ -59,6 +59,17 @@
else
$recur_type='';
// Code included by Jaguar - Ends
+
+ //Code included by Minnie - Starts
+ if(isset($_REQUEST['inviteesid']) && $_REQUEST['inviteesid']!='')
+ {
+ $selected_users_string = $_REQUEST['inviteesid'];
+ $invitees_array = explode(';',$selected_users_string);
+
+ }
+ else
+ $invitees_array='';
+ //Code included by Minnie - Ends
foreach($this->tab_name as $table_name)
{
@@ -168,6 +179,15 @@
$this->insertIntoRecurringTable($table_name,$module);
}
}// Code included by Jaguar - Ends
+ // Code included by Minnie - starts
+ elseif($table_name == "invitees")
+ {
+ if($invitees_array != '')
+ {
+ $this->insertIntoInviteeTable($table_name,$module,$invitees_array);
+ }
+ }
+ // Code included by Minnie - Ends
else
{
$this->insertIntoEntityTable($table_name, $module);
@@ -957,6 +977,24 @@
}
}
+// Code included by Minnie - starts
+function insertIntoInviteeTable($table_name,$module,$invitees_array)
+{
+ global $log,$adb;
+ $log->debug("Entering insertIntoInviteeTable(".$table_name.",".$module.",".$invitees_array.") method ...");
+ foreach($invitees_array as $inviteeid)
+ {
+ if($inviteeid != '')
+ {
+ $query="insert into invitees values(".$this->id.",".$inviteeid.")";
+ $adb->query($query);
+ }
+ }
+ $log->debug("Exiting insertIntoInviteeTable method ...");
+
+}
+// Code included by Minnie - Ends
+
// Code included by Jaguar - starts
function insertIntoRecurringTable($table_name,$module)
{
Modified: vtigercrm/branches/5.0_postgresql_integration/include/js/ListView.js
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/include/js/ListView.js (original)
+++ vtigercrm/branches/5.0_postgresql_integration/include/js/ListView.js Tue May 16 10:07:48 2006
@@ -115,3 +115,12 @@
}
+function getListViewEntries_js(module,url)
+{
+ show("status");
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+ var urlstring ="module="+module+"&action="+module+"Ajax&file=ListView&ajax=true&"+url;
+ ajaxObj.process("index.php?",urlstring);
+
+}
+
Modified: vtigercrm/branches/5.0_postgresql_integration/include/utils/ListViewUtils.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/include/utils/ListViewUtils.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/include/utils/ListViewUtils.php Tue May 16 10:07:48 2006
@@ -178,7 +178,7 @@
$lbl_name .=': (in '.$curr_symbol.')';
}
- $name = "<a href='index.php?module=".$module."&action=index".$sort_qry."&order_by=".$col."&sorder=".$temp_sorder."' class='listFormHeaderLinks'>".$lbl_name." ".$arrow."</a>";
+ $name = "<a href='javascript:;' onClick='getListViewEntries_js(\"".$module."\",\"order_by=".$col."&sorder=".$temp_sorder."\");' class='listFormHeaderLinks'>".$lbl_name." ".$arrow."</a>";
$arrow = '';
}
}
@@ -1901,9 +1901,8 @@
*/
if(($navigation_array['prev']) != 0)
{
- $output .= '<a href="index.php?module='.$module.'&action='.$action_val.$url_qry.'&start=1&viewname='.$viewid.'" title="First"><img src="'.$image_path.'start.gif" border="0" align="absmiddle"></a> ';
- $output .= '<a href="index.php?module='.$module.'&action='.$action_val.$url_qry.'&start='.$navigation_array['prev'].'&viewname='.$viewid.'" title="Previous"><img src="'.$image_path.'previous.gif" border="0" align="absmiddle"></a> ';
-
+ $output .= '<a href="javascript:;" onClick="getListViewEntries_js(\''.$module.'\',\'start=1\');" title="First"><img src="'.$image_path.'start.gif" border="0" align="absmiddle"></a> ';
+ $output .= '<a href="javascript:;" onClick="getListViewEntries_js(\''.$module.'\',\'start='.$navigation_array['prev'].'\');" title="Previous"><img src="'.$image_path.'previous.gif" border="0" align="absmiddle"></a> ';
}
else
{
@@ -1915,13 +1914,13 @@
$output .='<b>'.$i.'</b> ';
}
else{
- $output .= '<a href="index.php?module='.$module.'&action='.$action_val.$url_qry.'&start='.$i.'&viewname='.$viewid.'" >'.$i.'</a> ';
+ $output .= '<a href="javascript:;" onClick="getListViewEntries_js(\''.$module.'\',\'start='.$i.'\');" >'.$i.'</a> ';
}
}
if(($navigation_array['next']) !=0)
{
- $output .= '<a href="index.php?module='.$module.'&action='.$action_val.$url_qry.'&start='.$navigation_array['next'].'&viewname='.$viewid.'" title="Next"><img src="'.$image_path.'next.gif" border="0" align="absmiddle"></a> ';
- $output .= '<a href="index.php?module='.$module.'&action='.$action_val.$url_qry.'&start='.$navigation_array['verylast'].'&viewname='.$viewid.'" title="Last"><img src="'.$image_path.'end.gif" border="0" align="absmiddle"></a> ';
+ $output .= '<a href="javascript:;" onClick="getListViewEntries_js(\''.$module.'\',\'start='.$navigation_array['next'].'\');" title="Next"><img src="'.$image_path.'next.gif" border="0" align="absmiddle"></a> ';
+ $output .= '<a href="javascript:;" onClick="getListViewEntries_js(\''.$module.'\',\'start='.$navigation_array['verylast'].'\');" title="Last"><img src="'.$image_path.'end.gif" border="0" align="absmiddle"></a> ';
}
else
{
@@ -1996,4 +1995,6 @@
}
}
+
+
?>
Modified: vtigercrm/branches/5.0_postgresql_integration/modules/Activities/Activity.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/Activities/Activity.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/Activities/Activity.php Tue May 16 10:07:48 2006
@@ -58,7 +58,7 @@
var $reminder_table = "activity_reminder";
- var $tab_name = Array('crmentity','activity','seactivityrel','cntactivityrel','salesmanactivityrel','activity_reminder','recurringevents');
+ var $tab_name = Array('crmentity','activity','seactivityrel','cntactivityrel','salesmanactivityrel','activity_reminder','recurringevents','invitees');
var $tab_name_index = Array('crmentity'=>'crmid','activity'=>'activityid','seactivityrel'=>'activityid','cntactivityrel'=>'activityid','salesmanactivityrel'=>'activityid','activity_reminder'=>'activity_id','recurringevents'=>'activityid');
Modified: vtigercrm/branches/5.0_postgresql_integration/modules/Activities/Save.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/Activities/Save.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/Activities/Save.php Tue May 16 10:07:48 2006
@@ -128,6 +128,27 @@
$mail_status = send_mail('Activities',$to_email,$current_user->user_name,'',$subject,$description);
}
+//code added to send mail to the invitees
+if(isset($_REQUEST['inviteesid']) && $_REQUEST['inviteesid']!='')
+{
+ global $current_user;
+ $local_log->info("send notification is on");
+ require_once("modules/Emails/mail.php");
+ $selected_users_string = $_REQUEST['inviteesid'];
+ $invitees_array = explode(';',$selected_users_string);
+ $subject = $_REQUEST['activity_mode'].' : '.$_REQUEST['subject'];
+ $description = getActivityDetails($_REQUEST['description']);
+ foreach($invitees_array as $inviteeid)
+ {
+ if($inviteeid != '')
+ {
+ $to_email = getUserEmailId('id',$inviteeid);
+ $mail_status = send_mail('Activities',$to_email,$current_user->user_name,'',$subject,$description);
+ }
+ }
+}
+
+
//code added for returning back to the current view after edit from list view
if($_REQUEST['return_viewname'] == '') $return_viewname='0';
if($_REQUEST['return_viewname'] != '')$return_viewname=$_REQUEST['return_viewname'];
Modified: vtigercrm/branches/5.0_postgresql_integration/schema/DatabaseSchema.xml
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/schema/DatabaseSchema.xml (original)
+++ vtigercrm/branches/5.0_postgresql_integration/schema/DatabaseSchema.xml Tue May 16 10:07:48 2006
@@ -5068,5 +5068,13 @@
</field>
</table>
+ <table name="invitees">
+ <field name="activityid" type="I" size="19">
+ <KEY/>
+ </field>
+ <field name="inviteeid" type="I" size="19">
+ <KEY/>
+ </field>
+ </table>
</schema>
More information about the vtigercrm-commits
mailing list