allow caller to pass additional onpostapply and oncancel handlers
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 4 Feb 2009 04:46:55 +0000 (04:46 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 4 Feb 2009 04:46:55 +0000 (04:46 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@12056 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/openils/widget/EditDialog.js

index 39ebc64..734c185 100644 (file)
@@ -27,8 +27,18 @@ if(!dojo._hasResource['openils.widget.EditDialog']) {
             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();
+                }
             },
 
             /**