diff options
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/jquery.ocdialog.js | 9 | ||||
-rw-r--r-- | core/js/oc-dialogs.js | 9 |
2 files changed, 7 insertions, 11 deletions
diff --git a/core/js/jquery.ocdialog.js b/core/js/jquery.ocdialog.js index 52ff5633f9a..ce991052271 100644 --- a/core/js/jquery.ocdialog.js +++ b/core/js/jquery.ocdialog.js @@ -40,6 +40,9 @@ } // Escape if(event.keyCode === 27 && self.options.closeOnEscape) { + if (self.closeCB) { + self.closeCB(); + } self.close(); return false; } @@ -190,7 +193,7 @@ } }, widget: function() { - return this.$dialog + return this.$dialog; }, close: function() { this._destroyOverlay(); @@ -203,10 +206,10 @@ }, destroy: function() { if(this.$title) { - this.$title.remove() + this.$title.remove(); } if(this.$buttonrow) { - this.$buttonrow.remove() + this.$buttonrow.remove(); } if(this.originalTitle) { diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index cf77f5018a6..88a3f6628cb 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -297,14 +297,7 @@ var OCdialogs = { closeOnEscape: true, modal: true, buttons: buttonlist, - close: function(event, ui) { - try { - $(this).ocdialog('destroy').remove(); - } catch(e) { - alert (e); - } - self.$ = null; - } + closeButton: null }); OCdialogs.dialogs_counter++; |