From 9da49264ea6edbad13455a3e66d7f369f2e8448f Mon Sep 17 00:00:00 2001 From: Jörn Friedrich Dreyer Date: Wed, 14 Aug 2013 17:49:45 +0200 Subject: change filelist ui updates --- core/js/jquery.ocdialog.js | 9 ++++++--- core/js/oc-dialogs.js | 9 +-------- 2 files changed, 7 insertions(+), 11 deletions(-) (limited to 'core/js') 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++; -- cgit v1.2.3