Many, many changes, and yet still much to do. Many things are working, but certainly nothing beyond simply data retrieval (no editing or adding of any data). Also, some work is still required to ensure the grids have the right columns; we can strip out certain columns for some views (such as removing customer from the leases grid of the customer view... completely redundant). And of course, there are still many bugs and lots to clean up.
git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@368 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -160,6 +160,7 @@ class GridHelper extends AppHelper {
|
||||
$included = array_merge($included, $config['include']);
|
||||
if (isset($config['exclude']))
|
||||
$excluded = array_merge($excluded, $config['exclude']);
|
||||
unset($config['include'], $config['exclude']);
|
||||
|
||||
// Calculate the actual inclusion set
|
||||
$included = array_diff(array_merge($this->included, $included),
|
||||
@@ -169,6 +170,10 @@ class GridHelper extends AppHelper {
|
||||
$this->jqGrid_options['jqGridColumns']
|
||||
= array_intersect_key($this->columns, array_flip($included));
|
||||
|
||||
// Make sure search fields are all part of the inclusion set
|
||||
$this->jqGrid_options['search_fields']
|
||||
= array_intersect($this->jqGrid_options['search_fields'], $included);
|
||||
|
||||
// As an exception to the normal config variables,
|
||||
// handle 'rows' here. The reason is so that we
|
||||
// ease the burden on views which have a list of
|
||||
@@ -178,8 +183,17 @@ class GridHelper extends AppHelper {
|
||||
if (isset($config['rows'])) {
|
||||
// Shrink the limit... user can always override
|
||||
$this->id_list($config['rows'])->limit(10);
|
||||
unset($config['rows']);
|
||||
}
|
||||
|
||||
// One more exception, as the search fields get
|
||||
// defined, but not passed to jqGrid unless
|
||||
// specifically requested.
|
||||
if (isset($config['search']))
|
||||
unset($config['search']);
|
||||
else
|
||||
unset($this->jqGrid_options['search_fields']);
|
||||
|
||||
// Figure out what controller we're using to
|
||||
// populate the grid via ajax, and set it.
|
||||
$controller = $this->controller;
|
||||
|
||||
Reference in New Issue
Block a user