From: erickson Date: Wed, 4 Feb 2009 04:46:55 +0000 (+0000) Subject: allow caller to pass additional onpostapply and oncancel handlers X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e8af3b2c60fc9feeee8a94a08e84cc3706cdcf8e;p=evergreen%2Ftadl.git allow caller to pass additional onpostapply and oncancel handlers git-svn-id: svn://svn.open-ils.org/ILS/trunk@12056 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/js/dojo/openils/widget/EditDialog.js b/Open-ILS/web/js/dojo/openils/widget/EditDialog.js index 39ebc6407c..734c185689 100644 --- a/Open-ILS/web/js/dojo/openils/widget/EditDialog.js +++ b/Open-ILS/web/js/dojo/openils/widget/EditDialog.js @@ -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(); + } }, /**