[open-ils-commits] r11524 - trunk/Open-ILS/web/js/ui/default/acq/financial
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Dec 11 11:39:49 EST 2008
Author: erickson
Date: 2008-12-11 11:39:47 -0500 (Thu, 11 Dec 2008)
New Revision: 11524
Modified:
trunk/Open-ILS/web/js/ui/default/acq/financial/list_funding_sources.js
Log:
moved to streaming call and dynamic grid updates
Modified: trunk/Open-ILS/web/js/ui/default/acq/financial/list_funding_sources.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/financial/list_funding_sources.js 2008-12-11 16:12:54 UTC (rev 11523)
+++ trunk/Open-ILS/web/js/ui/default/acq/financial/list_funding_sources.js 2008-12-11 16:39:47 UTC (rev 11524)
@@ -4,7 +4,7 @@
dojo.require('openils.acq.CurrencyType');
dojo.require('openils.widget.OrgUnitFilteringSelect');
dojo.require('dijit.form.Button');
-dojo.require('dojo.data.ItemFileReadStore');
+dojo.require('dojo.data.ItemFileWriteStore');
dojo.require('dojox.grid.DataGrid');
dojo.require('openils.Event');
dojo.require('openils.Util');
@@ -23,13 +23,23 @@
}
function loadFSGrid() {
- openils.acq.FundingSource.createStore(
- function(storeData) {
- var store = new dojo.data.ItemFileReadStore({data:storeData});
- fundingSourceListGrid.setStore(store);
- fundingSourceListGrid.render();
+ var store = new dojo.data.ItemFileWriteStore({data:acqfs.initStoreData()});
+ fundingSourceListGrid.setStore(store);
+ fundingSourceListGrid.render();
+
+ fieldmapper.standardRequest(
+ ['open-ils.acq', 'open-ils.acq.funding_source.org.retrieve'],
+ { async: true,
+ params: [openils.User.authtoken, null, {flesh_summary:1}],
+ onresponse : function(r) { /* request object */
+ if(fs = openils.Util.readResponse(r)) {
+ openils.acq.FundingSource.cache[fs.id()] = fs;
+ store.newItem(acqfs.itemToStoreData(fs));
+ }
+ }
}
);
}
openils.Util.addOnLoad(loadFSGrid);
+
More information about the open-ils-commits
mailing list