[open-ils-commits] r11534 - trunk/Open-ILS/web/js/ui/default/acq/financial
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Dec 11 17:11:42 EST 2008
Author: erickson
Date: 2008-12-11 17:11:38 -0500 (Thu, 11 Dec 2008)
New Revision: 11534
Modified:
trunk/Open-ILS/web/js/ui/default/acq/financial/list_providers.js
Log:
moved to dynamic grid rendering
Modified: trunk/Open-ILS/web/js/ui/default/acq/financial/list_providers.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/financial/list_providers.js 2008-12-11 22:09:49 UTC (rev 11533)
+++ trunk/Open-ILS/web/js/ui/default/acq/financial/list_providers.js 2008-12-11 22:11:38 UTC (rev 11534)
@@ -2,7 +2,7 @@
dojo.require("dijit.form.FilteringSelect");
dojo.require('dijit.form.Button');
dojo.require('dojox.grid.DataGrid');
-dojo.require('dojo.data.ItemFileReadStore');
+dojo.require('dojo.data.ItemFileWriteStore');
dojo.require('openils.acq.CurrencyType');
dojo.require('openils.Event');
dojo.require('openils.Util');
@@ -17,13 +17,22 @@
}
function loadProviderGrid() {
- openils.acq.Provider.createStore(
- function(storeData) {
- var store = new dojo.data.ItemFileReadStore({data:storeData});
-
- providerListGrid.setStore(store);
- providerListGrid.render();
- }
+ var store = new dojo.data.ItemFileWriteStore({data:acqpro.initStoreData()});
+ providerListGrid.setStore(store);
+ providerListGrid.render();
+
+ fieldmapper.standardRequest(
+ ['open-ils.acq', 'open-ils.acq.provider.org.retrieve'],
+ { async: true,
+ params: [openils.User.authtoken],
+ onresponse : function(r) {
+ if( lp = openils.Util.readResponse(r)) {
+ openils.acq.Provider.cache[lp.id()] = lp;
+ store.newItem(acqpro.itemToStoreData(lp));
+ }
+ }
+ }
+
);
}
More information about the open-ils-commits
mailing list