[open-ils-commits] r10044 -
branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Jul 14 22:50:56 EDT 2008
Author: erickson
Date: 2008-07-14 22:50:54 -0400 (Mon, 14 Jul 2008)
New Revision: 10044
Modified:
branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/Provider.js
Log:
added create
Modified: branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/Provider.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/Provider.js 2008-07-15 02:44:20 UTC (rev 10043)
+++ branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/Provider.js 2008-07-15 02:50:54 UTC (rev 10044)
@@ -68,7 +68,26 @@
return openils.acq.Provider.cache[id];
};
+openils.acq.Provider.create = function(fields, oncomplete) {
+ var provider = new acqpro()
+ for(var field in fields)
+ provider[field](fields[field]);
+ fieldmapper.standardRequest(
+ ['open-ils.acq', 'open-ils.acq.provider.create'],
+ { async: true,
+ params: [openils.User.authtoken, provider],
+ oncomplete: function(r) {
+ var msg = r.recv();
+ var id = msg.content();
+ if(oncomplete)
+ oncomplete(id);
+ }
+ }
+ );
+};
+
+
openils.acq.Provider.retrieveLineitemProviderAttrDefs = function(providerId, oncomplete) {
fieldmapper.standardRequest(
['open-ils.acq', 'open-ils.acq.lineitem_provider_attr_definition.provider.retrieve.atomic'],
More information about the open-ils-commits
mailing list