[open-ils-commits] r11823 - trunk/Open-ILS/web/js/dojo/openils

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Jan 14 12:08:24 EST 2009


Author: erickson
Date: 2009-01-14 12:08:21 -0500 (Wed, 14 Jan 2009)
New Revision: 11823

Modified:
   trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js
Log:
call the final oncomplete from the complete handler of xact.commit, instead of starting over at index 0

Modified: trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js	2009-01-14 16:41:28 UTC (rev 11822)
+++ trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js	2009-01-14 17:08:21 UTC (rev 11823)
@@ -203,16 +203,16 @@
                             oncomplete : function (r) {
                                 var res = r.recv();
                                 if ( res && res.content() ) {
-                                    _CUD_recursive( list, 0 );
+                                    console.log(req + ' : ' + req._final_complete);
+                                    if(req._final_complete)
+                                        req._final_complete(req);
+                                    _pcrud.disconnect();
                                 } else {
                                     _pcrud.disconnect();
                                     throw 'Transaction commit error';
                                 }
                             },
                         }).send();
-
-                        if (r._final_complete) r._final_complete(r);
-                        _pcrud.disconnect();
                     };
 
                     req.onerror = function (r) {



More information about the open-ils-commits mailing list