[Vtigercrm-commits] [vtiger-commits] r5823 - in /vtigercrm/trunk: Smarty/templates/ListView.tpl include/utils/ListViewUtils.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed May 10 08:41:19 EDT 2006
Author: saraj
Date: Wed May 10 06:41:13 2006
New Revision: 5823
Log:
Alphabetical search values retained during display
Modified:
vtigercrm/trunk/Smarty/templates/ListView.tpl
vtigercrm/trunk/include/utils/ListViewUtils.php
Modified: vtigercrm/trunk/Smarty/templates/ListView.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/ListView.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/ListView.tpl Wed May 10 06:41:13 2006
@@ -60,7 +60,34 @@
urlstring = urlstring +'action={$MODULE}Ajax&ajax=true';
ajaxObj.process("index.php?",urlstring);
{rdelim}
-
+function alphabetic(url)
+{ldelim}
+
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+
+ url_param = url.split('&');
+ for(plen=0; plen< url_param.length;plen++)
+ {ldelim}
+ url_var=url_param[plen];
+ if(url_var.search(/search_text/gi)!= -1)
+ {ldelim}
+ name_value = url_var.split('=');
+ document.basicSearch.search_text.value = name_value[1];
+ {rdelim}
+ else if(url_var.search(/search_field/gi)!= -1)
+ {ldelim}
+ name_value = url_var.split('=');
+ var oSfield = getObj("search_field");
+ for (os=0; os<oSfield.length;os++)
+ {ldelim}
+ if(oSfield[os].value == name_value[1])
+ oSfield.selectedIndex = os;
+ {rdelim}
+ {rdelim}
+
+ {rdelim}
+ ajaxObj.process("index.php?",url);
+{rdelim}
</script>
{include file='Buttons_List.tpl'}
Modified: vtigercrm/trunk/include/utils/ListViewUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/ListViewUtils.php (original)
+++ vtigercrm/trunk/include/utils/ListViewUtils.php Wed May 10 06:41:13 2006
@@ -1661,7 +1661,7 @@
for($var='A',$i =1;$i<=26;$i++,$var++)
// Mike Crowe Mod --------------------------------------------------------added groupid to url
- $list .= '<td class="searchAlph" align="center"><a href="index.php?module='.$module.'&action='.$action.'&viewname='.$viewid.'&gname='.$groupid.'&query='.$query.'&search_field='.$fieldname.'&searchtype=BasicSearch&search_text='.$var.$flag.$popuptypevalue.$returnvalue.$append_url.'">'.$var.'</a></td>';
+ $list .= '<td class="searchAlph" align="center"><a href="javascript:;" onclick="alphabetic(\'ajax=true&action='.$module.'Ajax&module='.$module.'&file='.$action.'&viewname='.$viewid.'&gname='.$groupid.'&query='.$query.'&search_field='.$fieldname.'&searchtype=BasicSearch&search_text='.$var.$flag.$popuptypevalue.$returnvalue.$append_url.'\')">'.$var.'</a></td>';
$log->debug("Exiting AlphabeticalSearch method ...");
return $list;
More information about the vtigercrm-commits
mailing list