Added generic mechanism to add userdata to the grid results. A 'userdata' callout function would be nice, but in practice, userdata may get added anywhere along the line, which is much easier than trying to figure out when to call such a callout and what parameters it would need to be passed.

git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629/site@338 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-15 07:44:51 +00:00
parent 6f4519fe56
commit 51d786ab8b

View File

@@ -403,6 +403,11 @@ class AppController extends Controller {
echo " <page>$page</page>\n"; echo " <page>$page</page>\n";
echo " <total>$total</total>\n"; echo " <total>$total</total>\n";
echo " <records>$records</records>\n"; echo " <records>$records</records>\n";
if (isset($params['userdata'])) {
foreach ($params['userdata'] AS $field => $value)
echo ' <userdata name="'.$field.'">' . "{$value}</userdata>\n";
}
} }
function jqGridDataOutputRecords(&$params, &$model, &$records) { function jqGridDataOutputRecords(&$params, &$model, &$records) {