[open-ils-commits] r9620 -
branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu May 15 11:16:33 EDT 2008
Author: erickson
Date: 2008-05-15 11:16:32 -0400 (Thu, 15 May 2008)
New Revision: 9620
Modified:
branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/Provider.js
Log:
added delete list option for provider defs
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-05-15 15:16:14 UTC (rev 9619)
+++ branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/Provider.js 2008-05-15 15:16:32 UTC (rev 9620)
@@ -69,7 +69,7 @@
};
-openils.acq.Provider.retrieveLineitemAttrDefs = function(providerId, oncomplete) {
+openils.acq.Provider.retrieveLineitemProviderAttrDefs = function(providerId, oncomplete) {
fieldmapper.standardRequest(
['open-ils.acq', 'open-ils.acq.lineitem_provider_attr_definition.provider.retrieve.atomic'],
{ async: true,
@@ -79,7 +79,7 @@
);
}
-openils.acq.Provider.createLineitemAttrDef = function(fields, oncomplete) {
+openils.acq.Provider.createLineitemProviderAttrDef = function(fields, oncomplete) {
var attr = new acqlipad();
for(var field in fields)
attr[field](fields[field]);
@@ -94,4 +94,25 @@
}
+openils.acq.Provider.lineitemProviderAttrDefDeleteList = function(list, oncomplete) {
+ openils.acq.Provider._lineitemProviderAttrDefDeleteList(list, 0, oncomplete);
}
+
+openils.acq.Provider._lineitemProviderAttrDefDeleteList = function(list, idx, oncomplete) {
+ if(idx >= list.length)
+ return oncomplete();
+ fieldmapper.standardRequest(
+ ['open-ils.acq', 'open-ils.acq.lineitem_provider_attr_definition.delete'],
+ { async: true,
+ params: [openils.User.authtoken, list[idx]],
+ oncomplete: function(r) {
+ msg = r.recv()
+ stat = msg.content();
+ /* XXX CHECH FOR EVENT */
+ openils.acq.Provider._lineitemProviderAttrDefDeleteList(list, ++idx, oncomplete);
+ }
+ }
+ );
+}
+
+}
More information about the open-ils-commits
mailing list