Moved all of the jqGrid search javascript into its own file to prevent duplication when including more than one grid on a page. I also put search boxes directly into the jqGrid element, with the requested fields passed in as a parameter. I've got the autosearch mechanism tied across all grids, but search and reload is grid specific. This was mostly to get the code into an extensible spot, but the layout is not yet desirable. I'll yank the search boxes on the next checkin not that its proven out.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@123 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -11,6 +11,18 @@ $cols['Move-Out'] = array('index' => 'Lease.moveout_date', 'formatter' => 'dat
|
||||
$cols['Balance'] = array('index' => 'Lease.balance', 'formatter' => 'currency');
|
||||
$cols['Comment'] = array('index' => 'Lease.comment', 'formatter' => 'comment');
|
||||
|
||||
echo $this->element('jqGrid',
|
||||
array('jqGridColumns' => $cols));
|
||||
$jqGrid_options = array('jqGridColumns' => $cols,
|
||||
'controller' => 'leases',
|
||||
'caption' => isset($caption) ? $caption : null);
|
||||
|
||||
if (isset($leases)) {
|
||||
$jqGrid_options += array('custom_ids' =>
|
||||
array_map(create_function('$data',
|
||||
'return $data["id"];'),
|
||||
$leases),
|
||||
'limit' => 5);
|
||||
}
|
||||
|
||||
$jqGrid_options += array('search_fields' => array('Customer', 'Unit'));
|
||||
|
||||
echo $this->element('jqGrid', $jqGrid_options);
|
||||
|
||||
Reference in New Issue
Block a user