Moved all grid elements onto the grid helper. Basic testing done, but more testing needs to be done.
git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@262 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -9,16 +9,13 @@ $cols['Width'] = array('index' => 'Map.width', 'width' => '50', 'align
|
||||
$cols['Depth'] = array('index' => 'Map.depth', 'width' => '50', 'align' => 'right');
|
||||
$cols['Comment'] = array('index' => 'Map.comment', 'formatter' => 'comment');
|
||||
|
||||
$jqGrid_options = array('jqGridColumns' => $cols,
|
||||
'controller' => 'maps',
|
||||
'caption' => isset($caption) ? $caption : null);
|
||||
// Set up search fields if requested by caller
|
||||
if (isset($searchfields))
|
||||
$grid->searchFields(array('Name'));
|
||||
|
||||
if (isset($maps)) {
|
||||
$jqGrid_options += array('custom_ids' =>
|
||||
array_map(create_function('$data',
|
||||
'return $data["id"];'),
|
||||
$maps),
|
||||
'limit' => 5);
|
||||
}
|
||||
|
||||
echo $this->element('jqGrid', $jqGrid_options);
|
||||
// Render the grid
|
||||
$grid
|
||||
->columns($cols)
|
||||
->sortField('Name')
|
||||
->defaultFields(array('ID', 'Name'))
|
||||
->render($this, isset($config) ? $config : null);
|
||||
|
||||
Reference in New Issue
Block a user