[open-ils-commits] r15435 - in trunk/Open-ILS/web/js/dojo/openils: . widget (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Feb 2 16:25:49 EST 2010
Author: erickson
Date: 2010-02-02 16:25:44 -0500 (Tue, 02 Feb 2010)
New Revision: 15435
Modified:
trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js
trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
trunk/Open-ILS/web/js/dojo/openils/widget/EditDialog.js
trunk/Open-ILS/web/js/dojo/openils/widget/EditPane.js
Log:
permacrud CUD actions support an oncomplete handler, but the request object passed as the argument already had it's responses pulled from the wire. pass the return_list as a second param to CUD onhandler functions. updated auto widgets to match
Modified: trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js 2010-02-02 18:44:24 UTC (rev 15434)
+++ trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js 2010-02-02 21:25:44 UTC (rev 15435)
@@ -237,7 +237,7 @@
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();
Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js 2010-02-02 18:44:24 UTC (rev 15434)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js 2010-02-02 21:25:44 UTC (rev 15435)
@@ -417,8 +417,8 @@
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)
Modified: trunk/Open-ILS/web/js/dojo/openils/widget/EditDialog.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/EditDialog.js 2010-02-02 18:44:24 UTC (rev 15434)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/EditDialog.js 2010-02-02 21:25:44 UTC (rev 15435)
@@ -38,9 +38,9 @@
self.hide();
}
- this.editPane.onPostSubmit = function(r) {
+ this.editPane.onPostSubmit = function(r, cudResults) {
self.hide();
- if(onSubmit) onSubmit(r);
+ if(onSubmit) onSubmit(r, cudResults);
}
},
Modified: trunk/Open-ILS/web/js/dojo/openils/widget/EditPane.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/EditPane.js 2010-02-02 18:44:24 UTC (rev 15434)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/EditPane.js 2010-02-02 21:25:44 UTC (rev 15435)
@@ -165,9 +165,9 @@
performAutoEditAction : function() {
var self = this;
self.performEditAction({
- oncomplete:function(r) {
+ oncomplete:function(req, cudResults) {
if(self.onPostSubmit)
- self.onPostSubmit(r);
+ self.onPostSubmit(req, cudResults);
}
});
},
More information about the open-ils-commits
mailing list