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

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Feb 3 23:46:57 EST 2009


Author: erickson
Date: 2009-02-03 23:46:55 -0500 (Tue, 03 Feb 2009)
New Revision: 12056

Modified:
   trunk/Open-ILS/web/js/dojo/openils/widget/EditDialog.js
Log:
allow caller to pass additional onpostapply and oncancel handlers

Modified: trunk/Open-ILS/web/js/dojo/openils/widget/EditDialog.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/EditDialog.js	2009-02-04 04:37:46 UTC (rev 12055)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/EditDialog.js	2009-02-04 04:46:55 UTC (rev 12056)
@@ -27,8 +27,18 @@
             constructor : function(args) {
                 this.editPane = new openils.widget.EditPane(args);
                 var self = this;
-                this.editPane.onCancel = function() { self.hide(); }
-                this.editPane.onPostApply = function() { self.hide(); }
+
+                this.editPane.onCancel = function() { 
+                    if(args.onCancel)
+                        args.onCancel();
+                    self.hide(); 
+                }
+
+                this.editPane.onPostApply = function() { 
+                    self.hide(); 
+                    if(args.onPostApply)
+                        args.onPostApply();
+                }
             },
 
             /**



More information about the open-ils-commits mailing list