[open-ils-commits] r12109 - trunk/Open-ILS/web/js/dojo/openils/widget (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Feb 8 11:05:22 EST 2009
Author: erickson
Date: 2009-02-08 11:05:20 -0500 (Sun, 08 Feb 2009)
New Revision: 12109
Modified:
trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
Log:
autogrid can now fetch and load all data of a given class
Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js 2009-02-08 14:59:49 UTC (rev 12108)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js 2009-02-08 16:05:20 UTC (rev 12109)
@@ -118,6 +118,21 @@
dialog.editPane.mode = 'create';
dialog.startup();
dialog.show();
+ },
+
+ loadAll : function(opts) {
+ dojo.require('openils.PermaCrud');
+ if(!opts) opts = {};
+ var self = this;
+ opts = dojo.mixin(opts, {
+ async : true,
+ streaming : true,
+ onresponse : function(r) {
+ var item = openils.Util.readResponse(r);
+ self.store.newItem(item.toStoreItem());
+ }
+ });
+ new openils.PermaCrud().retrieveAll(this.fmClass, opts);
}
}
);
More information about the open-ils-commits
mailing list