[open-ils-commits] r12332 - trunk/Open-ILS/web/js/dojo/openils/widget (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Mar 1 13:46:35 EST 2009
Author: erickson
Date: 2009-03-01 13:46:32 -0500 (Sun, 01 Mar 2009)
New Revision: 12332
Modified:
trunk/Open-ILS/web/js/dojo/openils/widget/EditDialog.js
Log:
allow caller to pass in a pre-built edit dialog
Modified: trunk/Open-ILS/web/js/dojo/openils/widget/EditDialog.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/EditDialog.js 2009-03-01 18:14:54 UTC (rev 12331)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/EditDialog.js 2009-03-01 18:46:32 UTC (rev 12332)
@@ -26,19 +26,21 @@
editPane : null, // reference to our EditPane object
constructor : function(args) {
- this.editPane = new openils.widget.EditPane(args);
+ args = args || {};
+ this.editPane = args.editPane || new openils.widget.EditPane(args);
var self = this;
+ var onCancel = args.onCancel || this.editPane.onCancel;
+ var onSubmit = args.onSubmit || this.editPane.onSubmit;
+
this.editPane.onCancel = function() {
- if(args.onCancel)
- args.onCancel();
+ if(onCancel) onCancel();
self.hide();
}
this.editPane.onPostSubmit = function(r) {
self.hide();
- if(args.onPostSubmit)
- args.onPostSubmit(r);
+ if(onSubmit) onSubmit(r);
}
},
More information about the open-ils-commits
mailing list