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/site@262 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-08 20:40:44 +00:00
parent a88f5829ce
commit 4d123b63f0
22 changed files with 327 additions and 321 deletions

View File

@@ -7,16 +7,13 @@ $cols['Name'] = array('index' => 'MonetarySource.name', 'formatter'
$cols['Type'] = array('index' => 'MonetaryType.name', 'formatter' => 'name');
$cols['Comment'] = array('index' => 'MonetarySource.comment', 'formatter' => 'comment');
$jqGrid_options = array('jqGridColumns' => $cols,
'controller' => 'monetary_sources',
'caption' => isset($caption) ? $caption : null);
// Set up search fields if requested by caller
if (isset($searchfields))
$grid->searchFields(array('ID', 'Name'));
if (isset($monetary_sources)) {
$jqGrid_options += array('custom_ids' =>
array_map(create_function('$data',
'return $data["id"];'),
$monetary_sources),
'limit' => 5);
}
echo $this->element('jqGrid', $jqGrid_options);
// Render the grid
$grid
->columns($cols)
->sortField('ID')
->defaultFields(array('ID', 'Name'))
->render($this, isset($config) ? $config : null);