Made the app controller include the action by default. Added virtual callouts for data order and limit. Changed fields to use formatting, including a custom format for currency and id. Added a function for auto conversion from PHP variables to javascript. Fixed some minor bugs in the controllers already converted to jqGrid. Moved leases onto jqGrid.

git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@118 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-06-14 19:50:09 +00:00
parent 67d640b1a0
commit 92d8387e8c
10 changed files with 260 additions and 254 deletions

View File

@@ -2,22 +2,14 @@
// Define the table columns
$cols = array();
$cols['ID'] = array('index' => 'Customer.id', 'width' => '30', 'align' => 'center');
if (isset($customers[0]['ContactsCustomer']))
$cols['Relationship'] = array('index' => 'ContactsCustomer.type', 'width' => '75', 'align' => 'left');
$cols['Name'] = array('index' => 'Customer.name', 'width' => '150', 'align' => 'left');
$cols['Last Name'] = array('index' => 'PrimaryContact.last_name', 'width' => '100', 'align' => 'left');
$cols['First Name'] = array('index' => 'PrimaryContact.first_name', 'width' => '100', 'align' => 'left');
$cols['Leases'] = array('index' => 'lease_count', 'width' => '60', 'align' => 'center');
$cols['Comment'] = array('index' => 'Customer.comment', 'width' => '300', 'align' => 'left');
// Some of the columns should not be sortable
foreach (array_intersect_key($cols, array('Comment'=>1)) AS $k => $v)
$cols[$k]['sortable'] = false;
// Some of the columns should be searchable
foreach (array_intersect_key($cols, array('Last Name'=>1, 'First Name'=>1)) AS $k => $v)
$cols[$k]['search'] = true;
$cols['ID'] = array('index' => 'Customer.id', 'formatter' => 'id');
if (0) // REVISIT<AP>: Need to figure out how to put this in play
$cols['Relationship'] = array('index' => 'ContactsCustomer.type', 'width' => '75');
$cols['Name'] = array('index' => 'Customer.name', 'width' => '150');
$cols['Last Name'] = array('index' => 'PrimaryContact.last_name', 'width' => '100');
$cols['First Name'] = array('index' => 'PrimaryContact.first_name', 'width' => '100');
$cols['Leases'] = array('index' => 'lease_count', 'width' => '60');
$cols['Comment'] = array('index' => 'Customer.comment', 'formatter' => 'comment');
echo $this->element('jqGrid',
array('jqGridColumns' => $cols));