[Vtigercrm-commits] [vtiger-commits] r9252 - in /vtigercrm/trunk/include/utils: DetailViewUtils.php EditViewUtils.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon Sep 4 07:31:37 EDT 2006
Author: richie
Date: Mon Sep 4 05:31:16 2006
New Revision: 9252
Log:
Ajax edit provided for multi selection combo box --Jeri
Modified:
vtigercrm/trunk/include/utils/DetailViewUtils.php
vtigercrm/trunk/include/utils/EditViewUtils.php
Modified: vtigercrm/trunk/include/utils/DetailViewUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/DetailViewUtils.php (original)
+++ vtigercrm/trunk/include/utils/DetailViewUtils.php Mon Sep 4 05:31:16 2006
@@ -120,6 +120,34 @@
$chk_val = '';
}
$options[] = array($pickListValue=>$chk_val );
+ }
+ $label_fld ["options"] = $options;
+ }
+ elseif($uitype == 33) //uitype 33 added for multiselector picklist - Jeri
+ {
+ $label_fld[] = $mod_strings[$fieldlabel];
+ $label_fld[] = str_ireplace(' |##| ',' , ',$col_fields[$fieldname]);
+
+ $pick_query="select * from vtiger_".$fieldname;
+ $pickListResult = $adb->query($pick_query);
+ $noofpickrows = $adb->num_rows($pickListResult);
+
+ $options = array();
+ $selected_entries = Array();
+ $selected_entries = explode(' |##| ',$col_fields[$fieldname]);
+ for($j = 0; $j < $noofpickrows; $j++)
+ {
+ $pickListValue = $adb->query_result($pickListResult,$j,strtolower($fieldname));
+ $chk_val = '';
+ foreach($selected_entries as $selected_entries_value)
+ {
+ if(trim($selected_entries_value) == trim($pickListValue))
+ {
+ $chk_val = 'selected';
+ break;
+ }
+ }
+ $options[] = array($pickListValue=>$chk_val);
}
$label_fld ["options"] = $options;
}
Modified: vtigercrm/trunk/include/utils/EditViewUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/EditViewUtils.php (original)
+++ vtigercrm/trunk/include/utils/EditViewUtils.php Mon Sep 4 05:31:16 2006
@@ -159,7 +159,7 @@
$noofoptions = $adb->num_rows($multiselect_result);
$options = array();
$found = false;
- $valur_arr = explode(' , ',$value);
+ $valur_arr = explode(' |##| ',$value);
for($j = 0; $j < $noofoptions; $j++)
{
$multiselect_combo = $adb->query_result($multiselect_result,$j,strtolower($fieldname));
More information about the vtigercrm-commits
mailing list