permacrud CUD actions support an oncomplete handler, but the request object passed...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 2 Feb 2010 21:25:44 +0000 (21:25 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 2 Feb 2010 21:25:44 +0000 (21:25 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@15435 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/openils/PermaCrud.js
Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
Open-ILS/web/js/dojo/openils/widget/EditDialog.js
Open-ILS/web/js/dojo/openils/widget/EditPane.js

index 1dfefe9..5dbc813 100644 (file)
@@ -237,7 +237,7 @@ if(!dojo._hasResource["openils.PermaCrud"]) {
                                     var res = r.recv();
                                     if ( res && res.content() ) {
                                         if(req._final_complete)
-                                            req._final_complete(req);
+                                            req._final_complete(req, _return_list);
                                         _pcrud.disconnect();
                                     } else {
                                         _pcrud.disconnect();
index dd9f114..54fd667 100644 (file)
@@ -417,8 +417,8 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) {
                     overrideWidgetClass : this.overrideEditWidgetClass,
                     overrideWidgetArgs : this.overrideWidgetArgs,
                     disableWidgetTest : this.disableWidgetTest,
-                    onPostSubmit : function(r) {
-                        var fmObject = openils.Util.readResponse(r);
+                    onPostSubmit : function(req, cudResults) {
+                        var fmObject = cudResults[0];
                         if(grid.onPostCreate)
                             grid.onPostCreate(fmObject);
                         if(fmObject) 
index 6bb66bd..08a22de 100644 (file)
@@ -38,9 +38,9 @@ if(!dojo._hasResource['openils.widget.EditDialog']) {
                     self.hide(); 
                 }
 
-                this.editPane.onPostSubmit = function(r) { 
+                this.editPane.onPostSubmit = function(r, cudResults) { 
                     self.hide(); 
-                    if(onSubmit) onSubmit(r);
+                    if(onSubmit) onSubmit(r, cudResults);
                 }
             },
 
index 051fa99..525a4cd 100644 (file)
@@ -165,9 +165,9 @@ if(!dojo._hasResource['openils.widget.EditPane']) {
             performAutoEditAction : function() {
                 var self = this;
                 self.performEditAction({
-                    oncomplete:function(r) {
+                    oncomplete:function(req, cudResults) {
                         if(self.onPostSubmit)
-                            self.onPostSubmit(r);
+                            self.onPostSubmit(req, cudResults);
                     }
                 });
             },