Added ability to rename columns on a case by case basis
git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@529 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -166,9 +166,14 @@ class GridHelper extends AppHelper {
|
||||
$included = array_diff(array_merge($this->included, $included),
|
||||
array_merge($this->invalid, $excluded));
|
||||
|
||||
// Extract the columns that correspond to the inclusion set
|
||||
$this->jqGrid_options['jqGridColumns']
|
||||
= array_intersect_key($this->columns, array_flip($included));
|
||||
// Defined the columns, based on the inclusion set,
|
||||
// remapping column names as necessary.
|
||||
$this->jqGrid_options['jqGridColumns'] = array();
|
||||
foreach (array_intersect_key($this->columns, array_flip($included)) AS $name => $col) {
|
||||
if (!empty($config['remap'][$name]))
|
||||
$name = $config['remap'][$name];
|
||||
$this->jqGrid_options['jqGridColumns'][$name] = $col;
|
||||
}
|
||||
|
||||
// Make sure search fields are all part of the inclusion set
|
||||
$this->jqGrid_options['search_fields']
|
||||
@@ -224,4 +229,4 @@ class GridHelper extends AppHelper {
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user