[open-ils-commits] r9418 -
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 21:03:27 EDT 2008
Author: erickson
Date: 2008-04-21 20:24:26 -0400 (Mon, 21 Apr 2008)
New Revision: 9418
Modified:
branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/Fund.js
Log:
implemented fund delete
Modified: branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/Fund.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/Fund.js 2008-04-22 00:00:00 UTC (rev 9417)
+++ branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/Fund.js 2008-04-22 00:24:26 UTC (rev 9418)
@@ -75,5 +75,36 @@
);
};
+openils.acq.Fund.deleteFromGrid = function(grid, onComplete) {
+ var list = []
+ var selected = grid.selection.getSelected();
+ for(var rowIdx in selected)
+ list.push(grid.model.getDatum(selected[rowIdx], 0));
+ openils.acq.Fund.deleteList(list, onComplete);
+};
+
+openils.acq.Fund.deleteList = function(list, onComplete) {
+ openils.acq.Fund._deleteList(list, 0, onComplete);
}
+openils.acq.Fund._deleteList = function(list, idx, onComplete) {
+ if(idx >= list.length)
+ return onComplete();
+
+ var fundId = list[idx];
+ delete openils.acq.Fund.cache[list[idx]];
+
+ fieldmapper.standardRequest(
+ ['open-ils.acq', 'open-ils.acq.fund.delete'],
+ { async: true,
+ params: [openils.User.authtoken, fundId],
+ oncomplete: function(r) {
+ stat = r.recv().content();
+ /* XXX CHECH FOR EVENT */
+ openils.acq.Fund._deleteList(list, ++idx, onComplete);
+ }
+ }
+ );
+};
+}
+
More information about the open-ils-commits
mailing list