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:
@@ -130,10 +130,6 @@ echo '<div CLASS="detail supporting">' . "\n";
|
||||
* Entries
|
||||
*/
|
||||
|
||||
$grid_setup =
|
||||
array('loadComplete' =>
|
||||
array('--special' => "function() {url=jQuery('#collected-entries-jqGrid').getGridParam('url');url=url.replace(/\/debug.*$/,'?'); pd=jQuery('#collected-entries-jqGrid').getPostData();$.each(pd,function(i){ url+=i+'='+escape(pd[i])+'&'; }); jQuery('#collected-entries-jqGrid-query').html('<A HREF=\"'+url+'\">Grid Query</A><BR>'); onGridLoadComplete();}"));
|
||||
|
||||
echo $this->element('ledger_entries', array
|
||||
(// Element configuration
|
||||
'collected_account_id' => $account['id'],
|
||||
@@ -144,7 +140,7 @@ echo $this->element('ledger_entries', array
|
||||
(
|
||||
'grid_div_id' => 'collected-entries',
|
||||
'grid_div_class' => 'text-below',
|
||||
'grid_setup' => $grid_setup,
|
||||
'grid_events' => array('loadComplete' => 'onGridLoadComplete()'),
|
||||
//'caption' => '<SPAN id="receipt-charges-caption"></SPAN>',
|
||||
'caption' => 'Collected ' . Inflector::pluralize($account['name'])
|
||||
),
|
||||
|
||||
@@ -11,9 +11,6 @@ echo $form->create(null, array('id' => 'deposit-form',
|
||||
'url' => array('controller' => 'accounts',
|
||||
'action' => 'deposit')));
|
||||
|
||||
$grid_setup = array();
|
||||
$grid_setup['hiddengrid'] = true;
|
||||
|
||||
foreach ($tillableAccount AS $acct) {
|
||||
//$acct = $acct['Account'];
|
||||
|
||||
@@ -59,7 +56,7 @@ foreach ($tillableAccount AS $acct) {
|
||||
'grid_div_id' => $grid_div_id,
|
||||
'caption' => ('<A HREF="#" ONCLICK="$(\'#'.$grid_div_id.' .HeaderButton\').click();'.
|
||||
' return false;">Items in '.$acct['Account']['name'].' Ledger</A>'),
|
||||
'grid_setup' => $grid_setup,
|
||||
'grid_setup' => array('hiddengrid' => true),
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user