[Vtigercrm-commits] [vtiger-commits] r4397 - in /vtigercrm/branches/4.2/include: language/en_us.lang.php utils.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Mar 22 22:22:13 EST 2006
Author: mfedyk
Date: Wed Mar 22 20:22:10 2006
New Revision: 4397
Log:
Patch forUnicode-readyAlphabeticalSearch(), by justoff.
Modified:
vtigercrm/branches/4.2/include/language/en_us.lang.php
vtigercrm/branches/4.2/include/utils.php
Modified: vtigercrm/branches/4.2/include/language/en_us.lang.php
==============================================================================
--- vtigercrm/branches/4.2/include/language/en_us.lang.php (original)
+++ vtigercrm/branches/4.2/include/language/en_us.lang.php Wed Mar 22 20:22:10 2006
@@ -924,8 +924,35 @@
'Opportunities' => 'Opportunity'),
+// AlphabeticalSearch values for UTF-8-aware procedure
+// Allows multicharacter elements
+
+'alphabetical_search_values' => Array('A'
+ , 'B'
+ , 'C'
+ , 'D'
+ , 'E'
+ , 'F'
+ , 'G'
+ , 'H'
+ , 'I'
+ , 'J'
+ , 'K'
+ , 'L'
+ , 'M'
+ , 'N'
+ , 'O'
+ , 'P'
+ , 'Q'
+ , 'R'
+ , 'S'
+ , 'U'
+ , 'V'
+ , 'W'
+ , 'X'
+ , 'Y'
+ , 'Z'
+ ),
);
-
-
?>
Modified: vtigercrm/branches/4.2/include/utils.php
==============================================================================
--- vtigercrm/branches/4.2/include/utils.php (original)
+++ vtigercrm/branches/4.2/include/utils.php Wed Mar 22 20:22:10 2006
@@ -4087,6 +4087,9 @@
//parameter $viewid added for customview 27/5
function AlphabeticalSearch($module,$action,$fieldname,$query,$type,$popuptype='',$recordid='',$return_module='',$append_url='',$viewid='')
{
+ /* for access to alphabetical_search values stored in /include/$lang.language.php */
+ global $app_list_strings;
+
if($type=='advanced')
$flag='&advanced=true';
@@ -4097,9 +4100,14 @@
$returnvalue = '&recordid='.$recordid;
if($return_module != '')
$returnvalue .= '&return_module='.$return_module;
-
- for($var='A',$i =1;$i<=26;$i++,$var++)
- $list .= '<td class="alphaBg"><a href="index.php?module='.$module.'&action='.$action.'&viewname='.$viewid.'&query='.$query.'&'.$fieldname.'='.$var.$flag.$popuptypevalue.$returnvalue.$append_url.'">'.$var.'</a></td>';
+ // gettin' values
+ $alphabetical_search_values = & $app_list_strings['alphabetical_search_values'];
+ /* world alphabets has different count of letters. Plus we can add "special" (multucharacter) values in alphabetical seach bar */
+ $count = count($alphabetical_search_values);
+
+ // building alphabetical search bar from array values
+ for($i =0;$i<=$count;$i++)
+ $list .= '<td class="alphaBg"><a href="index.php?module='.$module.'&action='.$action.'&viewname='.$viewid.'&query='.$query.'&'.$fieldname.'='.$alphabetical_search_values[$i].$flag.$popuptypevalue.$returnvalue.$append_url.'">'.$alphabetical_search_values[$i].'</a></td>';
return $list;
}
More information about the vtigercrm-commits
mailing list