updated oncomplete handlers for new PermaCrud CUD response style
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 2 Feb 2010 21:38:19 +0000 (21:38 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 2 Feb 2010 21:38:19 +0000 (21:38 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@15436 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/ui/default/acq/po/view_po.js
Open-ILS/web/js/ui/default/conify/global/config/circ_matrix_matchpoint.js

index 5d09dc9..742d4ef 100644 (file)
@@ -65,8 +65,8 @@ function updatePoName() {
     PO.name(value);
     var pcrud = new openils.PermaCrud();
     pcrud.update(PO, {
-        oncomplete : function(r) {
-            var stat = openils.Util.readResponse(r);
+        oncomplete : function(r, cudResults) {
+            var stat = cudResults[0];
             if(stat) 
                 dojo.byId('acq-po-view-name').innerHTML = value;
         }
index f415f56..990bbaf 100644 (file)
@@ -144,8 +144,8 @@ function applyCircModChanges() {
         if(group.isnew()) {
 
             pcrud.create(group, {
-                oncomplete : function(r) {
-                    var group = openils.Util.readResponse(r);
+                oncomplete : function(r, cudResults) {
+                    var group = cudResults[0];
                     dojo.forEach(entries, function(e) { e.circ_mod_test(group.id()) } );
                     pcrud.create(entries, {
                         oncomplete : function() {
@@ -158,8 +158,7 @@ function applyCircModChanges() {
         } else {
 
             pcrud.update(group, {
-                oncomplete : function(r) {
-                    openils.Util.readResponse(r);
+                oncomplete : function(r, cudResults) {
                     var newOnes = entries.filter(function(e) { return e.isnew() });
                     var delOnes = entries.filter(function(e) { return e.isdeleted() });
                     if(!delOnes.length && !newOnes.length) {