[open-ils-commits] r11399 - trunk/Open-ILS/web/js/ui/default/conify/global/config
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Dec 3 18:03:05 EST 2008
Author: erickson
Date: 2008-12-03 18:02:59 -0500 (Wed, 03 Dec 2008)
New Revision: 11399
Modified:
trunk/Open-ILS/web/js/ui/default/conify/global/config/standing_penalty.js
Log:
doing order-by on retrieval instead of client side. using streaming + write store to update grid as data arrives
Modified: trunk/Open-ILS/web/js/ui/default/conify/global/config/standing_penalty.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/conify/global/config/standing_penalty.js 2008-12-03 22:26:30 UTC (rev 11398)
+++ trunk/Open-ILS/web/js/ui/default/conify/global/config/standing_penalty.js 2008-12-03 23:02:59 UTC (rev 11399)
@@ -1,23 +1,20 @@
dojo.require('dojox.grid.DataGrid');
-dojo.require('dojo.data.ItemFileReadStore');
+dojo.require('dojo.data.ItemFileWriteStore');
dojo.require('dojox.form.CheckedMultiSelect');
dojo.require('dijit.form.TextBox');
-var spList;
-
function spBuildGrid() {
+ var store = new dojo.data.ItemFileWriteStore({data:csp.toStoreData([])});
+ spGrid.setStore(store);
+ spGrid.render();
fieldmapper.standardRequest(
- ['open-ils.permacrud', 'open-ils.permacrud.search.csp.atomic'],
+ ['open-ils.permacrud', 'open-ils.permacrud.search.csp'],
{ async: true,
- params: [openils.User.authtoken, {id:{'!=':null}}],
- oncomplete: function(r) {
- if(spList = openils.Util.readResponse(r)) {
- spList = openils.Util.objectSort(spList);
- var store = new dojo.data.ItemFileReadStore({data:csp.toStoreData(spList)});
- spGrid.setStore(store);
- spGrid.render();
- }
- }
+ params: [openils.User.authtoken, {id:{'!=':null}}, {order_by:{csp:'id'}}],
+ onresponse: function(r) {
+ if(sp = openils.Util.readResponse(r))
+ store.newItem(csp.toStoreData([sp]).items[0]);
+ },
}
);
}
More information about the open-ils-commits
mailing list