Minor tweak to the css to create a margin for each grid, and so added a div to wrap each item listing. Changed the search boxes to only be available for the overall item listing.

git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@124 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-06-14 23:54:48 +00:00
parent 4d49ad6516
commit 31c603c757
6 changed files with 49 additions and 18 deletions

View File

@@ -9,13 +9,13 @@ if (!isset($limit))
if (!isset($limitOptions)) {
$limitOptions = array();
if ($limit < 10)
$limitOptions += array(2, 5);
array_push($limitOptions, 2, 5);
if ($limit < 30)
$limitOptions += array(10, 25);
array_push($limitOptions, 10, 25);
if ($limit > 10)
$limitOptions += array(50, 200);
array_push($limitOptions, 50, 200);
if ($limit > 20)
$limitOptions += array(500);
array_push($limitOptions, 500);
}
if (!isset($height))
@@ -24,8 +24,15 @@ if (!isset($height))
if (!isset($controller))
$controller = $this->params['controller'];
if (!isset($grid_div_class))
$grid_div_class = '';
$grid_div_class = 'item grid list' . ($grid_div_class ? ' '.$grid_div_class : '');
if (!isset($grid_div_id))
$grid_div_id = $controller . '-list';
if (!isset($grid_id))
$grid_id = $controller . '-jqGrid';
$grid_id = $grid_div_id . '-jqGrid';
if (!isset($search_fields))
$search_fields = array();
@@ -129,6 +136,9 @@ foreach ($jqGridColumns AS &$col) {
// to kick this thing off.
?>
<DIV ID="<?php echo $grid_div_id; ?>" CLASS="<?php echo $grid_div_class; ?>">
<table id="<?php echo $grid_id; ?>" class="scroll"></table>
<div id="<?php echo $grid_id; ?>-pager" class="scroll" style="text-align:center;"></div>
<script type="text/javascript"><!--
jQuery(document).ready(function(){
@@ -160,6 +170,7 @@ jQuery(document).ready(function(){
)); ?>
);
<?php
/* jQuery('#t_<?php echo $grid_id; ?>').height(25).hide() */
/* .filterGrid('#<?php echo $grid_id; ?>', { */
/* gridModel:true, */
@@ -186,14 +197,12 @@ jQuery(document).ready(function(){
/* } */
/* } */
/* }); */
?>
});
--></script>
<table id="<?php echo $grid_id; ?>" class="scroll"></table>
<div id="<?php echo $grid_id; ?>-pager" class="scroll" style="text-align:center;"></div>
<?php
if (count($search_fields) > 0) {
echo('<div>Search By:<BR>' . "\n");
@@ -222,3 +231,7 @@ jQuery(document).ready(function(){
echo('</div>' . "\n");
echo('</div>' . "\n");
}
// Finally, back to HTML mode, and end the grid DIV we created
?>
</DIV>