[Vtigercrm-commits] [vtiger-commits] r10764 - in /vtigercrm/branches/5.0.3: include/js/ListView.js modules/Users/massdelete.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Mon Apr 23 11:24:28 EDT 2007


Author: richie
Date: Mon Apr 23 09:24:19 2007
New Revision: 10764

Log:
* Fixed the issue in navigation when we use mass delete, Fixed #3382

Modified:
    vtigercrm/branches/5.0.3/include/js/ListView.js
    vtigercrm/branches/5.0.3/modules/Users/massdelete.php

Modified: vtigercrm/branches/5.0.3/include/js/ListView.js
==============================================================================
--- vtigercrm/branches/5.0.3/include/js/ListView.js (original)
+++ vtigercrm/branches/5.0.3/include/js/ListView.js Mon Apr 23 09:24:19 2007
@@ -47,13 +47,13 @@
 	}
 	return viewid;	
 }
+var gstart='';
 function massDelete(module)
 {
 		var select_options  =  document.getElementsByName('selected_id');
 		var x = select_options.length;
 		var viewid =getviewId();		
 		idstring = "";
-
         xx = 0;
         for(i = 0; i < x ; i++)
         {
@@ -81,13 +81,12 @@
 
 		if(confirm(alert_str))
 		{
-			
 			$("status").style.display="inline";
 			new Ajax.Request(
           	  	      'index.php',
 			      	{queue: {position: 'end', scope: 'command'},
 		                        method: 'post',
-                		        postBody:"module=Users&action=massdelete&return_module="+module+"&viewname="+viewid+"&idlist="+idstring,
+                		        postBody:"module=Users&action=massdelete&return_module="+module+"&"+gstart+"&viewname="+viewid+"&idlist="+idstring,
 		                        onComplete: function(response) {
         	        	                $("status").style.display="none";
                 	        	        result = response.responseText.split('&#&#&#');
@@ -138,6 +137,8 @@
                 urlstring = $('search_url').value;
 	else
 		urlstring = '';
+
+	gstart = url;
         new Ajax.Request(
         	'index.php',
                 {queue: {position: 'end', scope: 'command'},

Modified: vtigercrm/branches/5.0.3/modules/Users/massdelete.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Users/massdelete.php (original)
+++ vtigercrm/branches/5.0.3/modules/Users/massdelete.php Mon Apr 23 09:24:19 2007
@@ -19,6 +19,7 @@
 $viewid = $_REQUEST['viewname'];
 $returnmodule=$_REQUEST['return_module'];
 $return_action = $_REQUEST['return_action'];
+$rstart='';
 //split the string and store in an array
 $storearray = explode(";",$idlist);
 array_filter($storearray);
@@ -54,6 +55,10 @@
 {
 	$smod = "&smodule=".$_REQUEST['smodule'];
 }
+if(isset($_REQUEST['start']) && ($_REQUEST['start']!=''))
+{
+	$rstart = "&start=".$_REQUEST['start'];
+}
 if($returnmodule == 'Emails')
 {
 	if(isset($_REQUEST['folderid']) && $_REQUEST['folderid'] != '')
@@ -63,21 +68,21 @@
 	{
 		$folderid = 1;
 	}
-	header("Location: index.php?module=".$returnmodule."&action=".$returnmodule."Ajax&folderid=".$folderid."&ajax=delete&file=ListView&errormsg=".$errormsg);
+	header("Location: index.php?module=".$returnmodule."&action=".$returnmodule."Ajax&folderid=".$folderid."&ajax=delete".$rstart."&file=ListView&errormsg=".$errormsg);
 }
 elseif($return_action == 'ActivityAjax')
 {
 	$subtab = $_REQUEST['subtab'];
-	header("Location: index.php?module=".$returnmodule."&action=".$return_action."&view=".$_REQUEST['view']."&hour=".$_REQUEST['hour']."&day=".$_REQUEST['day']."&month=".$_REQUEST['month']."&year=".$_REQUEST['year']."&type=".$_REQUEST['type']."&viewOption=".$_REQUEST['viewOption']."&subtab=".$subtab);
+	header("Location: index.php?module=".$returnmodule."&action=".$return_action."".$rstart."&view=".$_REQUEST['view']."&hour=".$_REQUEST['hour']."&day=".$_REQUEST['day']."&month=".$_REQUEST['month']."&year=".$_REQUEST['year']."&type=".$_REQUEST['type']."&viewOption=".$_REQUEST['viewOption']."&subtab=".$subtab);
 }
 			
 elseif($returnmodule!='Faq')
 {
-	header("Location: index.php?module=".$returnmodule."&action=".$returnmodule."Ajax&ajax=delete&file=ListView&viewname=".$viewid."&errormsg=".$errormsg);
+	header("Location: index.php?module=".$returnmodule."&action=".$returnmodule."Ajax&ajax=delete".$rstart."&file=ListView&viewname=".$viewid."&errormsg=".$errormsg);
 }
 else
 {
-	header("Location: index.php?module=".$returnmodule."&action=".$returnmodule."Ajax&ajax=delete&file=ListView&errormsg=".$errormsg);
+	header("Location: index.php?module=".$returnmodule."&action=".$returnmodule."Ajax&ajax=delete".$rstart."&file=ListView&errormsg=".$errormsg);
 }
 ?>
 





More information about the vtigercrm-commits mailing list