Finally have a (slightly kludgy) fix for keeping the 'collected' grid from being rendered before ready.

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@531 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-11 07:24:52 +00:00
parent 52e0181bfb
commit 96c499786c

View File

@@ -16,7 +16,7 @@ echo '<div class="account collected">' . "\n";
// Reset the form // Reset the form
function resetForm() { function resetForm() {
<?php /* REVISIT <AP>: 20090810; Hate to do this, but first data is wrong... */ ?> <?php /* REVISIT <AP>: 20090810; Hate to do this, but first data is wrong... */ ?>
setTimeout(updateEntriesGrid, 1000); updateEntriesGrid();
} }
function onGridLoadComplete() { function onGridLoadComplete() {
@@ -45,7 +45,9 @@ function updateEntriesGrid() {
.setGridParam({ page: 1 }) .setGridParam({ page: 1 })
.trigger("reloadGrid"); .trigger("reloadGrid");
//$('#collected-entries .HeaderButton').click(); var gridstate = $('#collected-entries-jqGrid').getGridParam('gridstate');
if (gridstate == 'hidden')
$('#collected-entries .HeaderButton').click();
} }
@@ -162,7 +164,7 @@ echo $this->element('statement_entries', array
'grid_div_id' => 'collected-entries', 'grid_div_id' => 'collected-entries',
'grid_div_class' => 'text-below', 'grid_div_class' => 'text-below',
'grid_events' => array('loadComplete' => 'onGridLoadComplete()'), 'grid_events' => array('loadComplete' => 'onGridLoadComplete()'),
//'grid_setup' => array('hiddengrid' => true), 'grid_setup' => array('hiddengrid' => true),
//'caption' => '<SPAN id="receipt-charges-caption"></SPAN>', //'caption' => '<SPAN id="receipt-charges-caption"></SPAN>',
'caption' => 'Collected ' . Inflector::pluralize($account['name']), 'caption' => 'Collected ' . Inflector::pluralize($account['name']),
'filter' => array(//'StatementEntry.type' => 'DISBURSEMENT', 'filter' => array(//'StatementEntry.type' => 'DISBURSEMENT',