[Vtigercrm-commits] [vtiger-commits] r10777 - in /vtigercrm/branches/5.0.3: Smarty/templates/ListView.tpl include/RelatedListView.php include/utils/ListViewUtils.php modules/Users/updateLeadDBStatus.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue Apr 24 11:25:45 EDT 2007
Author: richie
Date: Tue Apr 24 09:25:34 2007
New Revision: 10777
Log:
* Fixed the issue in navigation when we do sorting or change owner, Fixed #3367#3376
Modified:
vtigercrm/branches/5.0.3/Smarty/templates/ListView.tpl
vtigercrm/branches/5.0.3/include/RelatedListView.php
vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php
vtigercrm/branches/5.0.3/modules/Users/updateLeadDBStatus.php
Modified: vtigercrm/branches/5.0.3/Smarty/templates/ListView.tpl
==============================================================================
--- vtigercrm/branches/5.0.3/Smarty/templates/ListView.tpl (original)
+++ vtigercrm/branches/5.0.3/Smarty/templates/ListView.tpl Tue Apr 24 09:25:34 2007
@@ -343,11 +343,16 @@
$("status").style.display="inline";
var viewid = document.getElementById('viewname').options[document.getElementById('viewname').options.selectedIndex].value;
var idstring = document.getElementById('idlist').value;
+ var tplstart='&';
+ if(gstart!='')
+ {
+ tplstart=tplstart+gstart;
+ }
if(statusname == 'status')
{
fninvsh('changestatus');
var url='&leadval='+document.getElementById('lead_status').options[document.getElementById('lead_status').options.selectedIndex].value;
- var urlstring ="module=Users&action=updateLeadDBStatus&return_module=Leads"+url+"&viewname="+viewid+"&idlist="+idstring;
+ var urlstring ="module=Users&action=updateLeadDBStatus&return_module=Leads"+tplstart+url+"&viewname="+viewid+"&idlist="+idstring;
}
else if(statusname == 'owner')
{
@@ -356,7 +361,7 @@
fninvsh('changeowner');
var url='&user_id='+document.getElementById('lead_owner').options[document.getElementById('lead_owner').options.selectedIndex].value;
{/literal}
- var urlstring ="module=Users&action=updateLeadDBStatus&return_module={$MODULE}"+url+"&viewname="+viewid+"&idlist="+idstring;
+ var urlstring ="module=Users&action=updateLeadDBStatus&return_module={$MODULE}"+tplstart+url+"&viewname="+viewid+"&idlist="+idstring;
{literal}
}
else
@@ -364,7 +369,7 @@
fninvsh('changeowner');
var url='&group_id='+document.getElementById('lead_group_owner').options[document.getElementById('lead_group_owner').options.selectedIndex].value;
{/literal}
- var urlstring ="module=Users&action=updateLeadDBStatus&return_module={$MODULE}"+url+"&viewname="+viewid+"&idlist="+idstring;
+ var urlstring ="module=Users&action=updateLeadDBStatus&return_module={$MODULE}"+tplstart+url+"&viewname="+viewid+"&idlist="+idstring;
{literal}
}
}
Modified: vtigercrm/branches/5.0.3/include/RelatedListView.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/RelatedListView.php (original)
+++ vtigercrm/branches/5.0.3/include/RelatedListView.php Tue Apr 24 09:25:34 2007
@@ -142,7 +142,8 @@
$query_order_by = "case when (vtiger_users.user_name not like '') then vtiger_users.user_name else vtiger_groups.groupname end ";
}
$query .= ' ORDER BY '.$query_order_by.' '.$sorder;
- $url_qry .="&order_by=".$order_by;
+
+ $url_qry .="&order_by=".$order_by."&sorder=".$sorder;
//Added for PHP version less than 5
if (!function_exists("stripos"))
{
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 Tue Apr 24 09:25:34 2007
@@ -402,10 +402,18 @@
$log->debug("Exiting getNavigationValues method ...");
return $navigation_array;
}
- if($noofrows != 0)
- $start = ((($display * $limit) - $limit)+1);
- else
- $start = 0;
+ if($noofrows != 0)
+ {
+ if(((($display * $limit)-$limit)+1) > $noofrows)
+ {
+ $display =floor($noofrows / $limit);
+ }
+ $start = ((($display * $limit) - $limit)+1);
+ }
+ else
+ {
+ $start = 0;
+ }
$end = $start + ($limit-1);
if($end > $noofrows)
@@ -1928,7 +1936,7 @@
LEFT JOIN vtiger_vendor
ON vtiger_vendor.vendorid = vtiger_products.vendor_id
LEFT JOIN vtiger_users
- ON vtiger_users.id = vtiger_products.handler
+ ON vtiger_users.id = vtiger_products.handler
WHERE vtiger_crmentity.deleted = 0 ".$where;
break;
Case "Notes":
@@ -3129,6 +3137,14 @@
{
$lv_array['start']=$_REQUEST['start'];
$start = $_REQUEST['start'];
+ }elseif($_SESSION['rlvs'][$module][$related]['start'] != '')
+ {
+
+ if($related!='')
+ {
+ $lv_array['start']=$_SESSION['rlvs'][$module][$related]['start'];
+ $start = $_SESSION['rlvs'][$module][$related]['start'];
+ }
}
if(isset($_REQUEST['viewname']) && $_REQUEST['viewname'] !='')
$lv_array['viewname']=$_REQUEST['viewname'];
Modified: vtigercrm/branches/5.0.3/modules/Users/updateLeadDBStatus.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Users/updateLeadDBStatus.php (original)
+++ vtigercrm/branches/5.0.3/modules/Users/updateLeadDBStatus.php Tue Apr 24 09:25:34 2007
@@ -1,13 +1,13 @@
<?php
/*********************************************************************************
-** The contents of this file are subject to the vtiger CRM Public License Version 1.0
+ ** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
-*
+ *
********************************************************************************/
require_once('include/database/PearDatabase.php');
@@ -19,6 +19,11 @@
$viewid = $_REQUEST['viewname'];
$return_module = $_REQUEST['return_module'];
$return_action = $_REQUEST['return_action'];
+global $rstart;
+if(isset($_REQUEST['start']) && $_REQUEST['start']!='')
+ {
+ $rstart="&start=".$_REQUEST['start'];
+ }
$module_array = array (
'Leads' => 'updateLeadGroupRelation',
'Accounts' => 'updateAccountGroupRelation',
@@ -131,7 +136,6 @@
{
$errormsg = '';
}
-
if($return_action == 'ActivityAjax')
{
$view = $_REQUEST['view'];
@@ -141,11 +145,12 @@
$type = $_REQUEST['type'];
$viewOption = $_REQUEST['viewOption'];
$subtab = $_REQUEST['subtab'];
- header("Location: index.php?module=$return_module&action=".$return_action."&type=".$type."&view=".$view."&day=".$day."&month=".$month."&year=".$year."&viewOption=".$viewOption."&subtab=".$subtab);
+
+ header("Location: index.php?module=$return_module&action=".$return_action."&type=".$type.$rstart."&view=".$view."&day=".$day."&month=".$month."&year=".$year."&viewOption=".$viewOption."&subtab=".$subtab);
}
else
{
- header("Location: index.php?module=$return_module&action=".$return_module."Ajax&file=ListView&ajax=changestate&viewname=".$viewid."&errormsg=".$errormsg);
+ header("Location: index.php?module=$return_module&action=".$return_module."Ajax&file=ListView&ajax=changestate".$rstart."&viewname=".$viewid."&errormsg=".$errormsg);
}
More information about the vtigercrm-commits
mailing list