acq fund permacrud porting
authorBill Erickson <berick@esilibrary.com>
Thu, 22 Mar 2012 18:09:44 +0000 (14:09 -0400)
committerBill Erickson <berick@esilibrary.com>
Fri, 23 Mar 2012 15:28:45 +0000 (11:28 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/templates/acq/fund/list.tt2
Open-ILS/web/js/ui/default/acq/financial/list_funds.js

index 83f2320..c70e1a1 100644 (file)
     </div>
 </div>
 
-<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:80%'>
     <table  jsId="lfGrid"
             dojoType="openils.widget.AutoGrid"
             fieldOrder="['id', 'name', 'code', 'year', 'org', 'currency_type', 'combined_balance']"
             requiredFields="['name', 'code', 'year', 'org', 'currency_type']"
             query="{id: '*'}"
-            defaultCellWidth='"auto"'
             fmClass='acqf'
             showPaginator='true'
             editOnEnter='true'>
index f9759fc..6da078a 100644 (file)
@@ -31,13 +31,7 @@ var fundFleshFields = [
     'allocation_total'
 ];
 
-function getBalanceInfo(rowIndex, item) {
-    if(!item) return '';
-    return this.grid.store.getValue(item, this.field) || 0;
-}
-
 function initPage() {
-
     contextOrg = openils.User.user.ws_ou();
 
     var connect = function() {
@@ -87,11 +81,12 @@ function loadFundGrid(year) {
     var pcrud = new openils.PermaCrud();
     pcrud.search('acqf', 
         {   year : year, 
-            org : fieldmapper.aou.descendantNodeList(contextOrg, true) 
-        }, 
-        {   flesh : 1,  
+            org : fieldmapper.aou.descendantNodeList(contextOrg, true) }, 
+        {   streaming : true,
+            limit: lfGrid.displayLimit,
+            offset: lfGrid.displayOffset,
+            flesh : 1,  
             flesh_fields : {acqf : fundFleshFields},
-            streaming : true,
             onresponse : function(r, obj) {
                 if(fund = openils.Util.readResponse(r)) {
                     fundFleshFields.forEach(function(ff) {