[Vtigercrm-commits] [vtiger-commits] r4299 - in /vtigercrm/trunk: Smarty/templates/ListView.tpl include/js/general.js include/utils/SearchUtils.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Sun Mar 19 14:12:17 EST 2006


Author: saraj
Date: Sun Mar 19 12:12:09 2006
New Revision: 4299

Log:
changes made for advance search

Modified:
    vtigercrm/trunk/Smarty/templates/ListView.tpl
    vtigercrm/trunk/include/js/general.js
    vtigercrm/trunk/include/utils/SearchUtils.php

Modified: vtigercrm/trunk/Smarty/templates/ListView.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/ListView.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/ListView.tpl Sun Mar 19 12:12:09 2006
@@ -158,6 +158,7 @@
                                                 <input type="hidden" name="parenttab" value="{$CATEGORY}">
 						<input type="hidden" name="action" value="index">
                                                 <input type="hidden" name="query" value="true">
+						<input type="hidden" name="search_cnt">
 
 
                                         </td>
@@ -200,15 +201,15 @@
 					<div id="fixed" style="position:relative;top:0px;left:0px;width:95%;height:95px;overflow:auto;" class="padTab">
 					<table width="95%"  border="0" cellpadding="5" cellspacing="0" id="adSrc" align="left">
 					<tr  class="dvtCellInfo">
-					<td width="31%"><select name="Fields" class="detailedViewTextBox">
+					<td width="31%"><select name="Fields0" class="detailedViewTextBox">
 					{$FIELDNAMES}
 					</select>
 					</td>
-					<td width="32%"><select name="Condition" class="detailedViewTextBox">
+					<td width="32%"><select name="Condition0" class="detailedViewTextBox">
 					{$CRITERIA}
 					</select>
 					</td>
-					<td width="32%"><input type="text" name="srch" class="detailedViewTextBox"></td>
+					<td width="32%"><input type="text" name="Srch_value0" class="detailedViewTextBox"></td>
 					</tr>
 					</table>
 					</div>	
@@ -216,7 +217,7 @@
 					</tr>
 					<tr>
 
-					<td><input type="button" name="more" value="More" onClick="fnAddSrch('{$FIELDNAMES}')">
+					<td><input type="button" name="more" value="More" onClick="fnAddSrch('{$FIELDNAMES}','{$CRITERIA}')">
 					&nbsp;&nbsp;
 					<input name="button" type="button" value="Fewer" onclick="delRow()"></td>
 					<td>&nbsp;</td>
@@ -255,8 +256,8 @@
 			
 
 {*<!-- Contents -->*}
+<form name="massdelete" method="POST">
 <table border=0 cellspacing=0 cellpadding=0 width=98% align=center>
-     <form name="massdelete" method="POST">
      <input name="idlist" type="hidden">
      <input name="change_owner" type="hidden">
      <input name="change_status" type="hidden">
@@ -358,7 +359,7 @@
 
      </td>
    </tr>
-   </form>	
 </table>
+</form>	
 {$SELECT_SCRIPT}
 

Modified: vtigercrm/trunk/include/js/general.js
==============================================================================
--- vtigercrm/trunk/include/js/general.js (original)
+++ vtigercrm/trunk/include/js/general.js Sun Mar 19 12:12:09 2006
@@ -1210,7 +1210,8 @@
 * javascript function to add field rows
 * @param option_values :: List of Field names
 */
-function fnAddSrch(option_values){
+var count = 0;
+function fnAddSrch(option_values,criteria_values){
 
     var tableName = document.getElementById('adSrc');
 
@@ -1235,12 +1236,17 @@
     var colthree = row.insertCell(2);
 
     //colone.innerHTML="<select name='Fields'+count class='detailedViewTextBox'><option>First Name</option><option>Last Name</option><option>Department</option><option>Role</option><option>E-Mild Id</option></select>";
-    colone.innerHTML="<select name='Fields'+count class='detailedViewTextBox'>"+option_values+"</select>";
-
-    coltwo.innerHTML="<select name='Condition'+count class='detailedViewTextBox'><option>Contains</option><option>doesn't Contains</option><option>is</option><option>isn't</option><option>Begins With</option><option>Ends With</option></select> ";
-
-    colthree.innerHTML="<input type='text' name='srch'+count class='detailedViewTextBox'>";
-
+    colone.innerHTML="<select name='Fields"+count+"' class='detailedViewTextBox'>"+option_values+"</select>";
+
+    coltwo.innerHTML="<select name='Condition"+count+"' class='detailedViewTextBox'>"+criteria_values+"</select> ";
+
+    colthree.innerHTML="<input type='text' name='Srch_value"+count+"' class='detailedViewTextBox'>";
+
+}
+
+function totalnoofrows()
+{
+        document.basicSearch.search_cnt.value = count;
 }
 
 /*

Modified: vtigercrm/trunk/include/utils/SearchUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/SearchUtils.php (original)
+++ vtigercrm/trunk/include/utils/SearchUtils.php Sun Mar 19 12:12:09 2006
@@ -362,12 +362,7 @@
 
 function getcriteria_options()
 {
-	$CRIT_OPT = "<option value=\"cts\">Contains</option>
-	            <option value=\"dcts\">doesn't Contains</option>
-		    <option value=\"is\">is</option>
-		    <option value=\"isn\">isn't</option>
-		    <option value=\"bwt\">Begins With</option>
-		    <option value=\"ewt\">Ends With</option>";
+	$CRIT_OPT = "<option value=\'cts\'>Contains</option><option value=\'dcts\'>does not Contains</option><option value=\'is\'>is</option><option value=\'isn\'>is not</option><option value=\'bwt\'>Begins With</option><option value=\'ewt\'>Ends With</option>";
 	return $CRIT_OPT;
 }
 function getSearch_criteria()





More information about the vtigercrm-commits mailing list