Standardized the grid events interface, to ease the burden on the views and ensure that the load functions could be used by the application without wiping out the debug functionality that was built into jqGrid.ctp
git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629/site@336 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -8,32 +8,9 @@
|
||||
**********************************************************************
|
||||
**********************************************************************
|
||||
**********************************************************************
|
||||
* Grid Setup / Javascript
|
||||
* Javascript
|
||||
*/
|
||||
|
||||
$grid_setup = array();
|
||||
|
||||
if (isset($customer['id']))
|
||||
$grid_setup['hiddengrid'] = true;
|
||||
|
||||
$grid_setup['onSelectRow'] = array
|
||||
('--special' =>
|
||||
'function(ids) { if (ids != null) { onRowSelect("#"+$(this).attr("id"), ids); } }'
|
||||
);
|
||||
|
||||
$grid_setup['onHeaderClick'] = array
|
||||
('--special' =>
|
||||
'function(gridstate) { onGridState("#"+$(this).attr("id"), gridstate); }'
|
||||
);
|
||||
|
||||
// Customer
|
||||
// Outstanding balance
|
||||
// Balance on each lease
|
||||
// Balance on personal account
|
||||
// Multiple fields for payments (cash, check, charge, etc)
|
||||
// How to apply (even split, oldest charges first, etc)
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<script type="text/javascript"><!--
|
||||
@@ -311,7 +288,14 @@ echo $this->element('customers', array
|
||||
'grid_div_class' => 'text-below',
|
||||
'caption' => ('<A HREF="#" ONCLICK="$(\'#customers-list .HeaderButton\').click();'.
|
||||
' return false;">Select Customer</A>'),
|
||||
'grid_setup' => $grid_setup,
|
||||
'grid_setup' => array('hiddengrid' => isset($customer['id'])),
|
||||
'grid_events' => array('onSelectRow' =>
|
||||
array('ids' =>
|
||||
'if (ids != null){onRowSelect("#"+$(this).attr("id"), ids);}'),
|
||||
'onHeaderClick' =>
|
||||
array('gridstate' =>
|
||||
'onGridState("#"+$(this).attr("id"), gridstate)'),
|
||||
),
|
||||
'nolinks' => true,
|
||||
'limit' => 10,
|
||||
)));
|
||||
|
||||
Reference in New Issue
Block a user