[open-ils-commits] r9410 -
branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Apr 21 15:26:15 EDT 2008
Author: erickson
Date: 2008-04-21 14:47:16 -0400 (Mon, 21 Apr 2008)
New Revision: 9410
Modified:
branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/CurrencyType.js
Log:
added general function to flesh a select widget with the full set of currency types
Modified: branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/CurrencyType.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/CurrencyType.js 2008-04-21 17:46:16 UTC (rev 9409)
+++ branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/CurrencyType.js 2008-04-21 18:47:16 UTC (rev 9410)
@@ -18,6 +18,8 @@
dojo._hasResource["openils.acq.CurrencyType"] = true;
dojo.provide("openils.acq.CurrencyType");
+ dojo.require('openils.User');
+
dojo.declare('openils.acq.CurrencyType', null, {
});
@@ -39,5 +41,15 @@
}
req.send();
}
+
+ openils.acq.CurrencyType.loadSelectWidget = function(selector) {
+ openils.acq.CurrencyType.fetchAll(
+ function(ctypes) {
+ selector.store = new dojo.data.ItemFileReadStore(
+ {data:acqct.toStoreData(ctypes, 'code', {identifier:'code'})});
+ selector.setValue(ctypes[0].code()); /* XXX get from setting */
+ }
+ );
+ }
}
More information about the open-ils-commits
mailing list