Only displays AJAX content when the dialog is visible
authorMagnus Kühn <magnus.khn@gmail.com>
Sun, 28 Oct 2012 05:39:14 +0000 (06:39 +0100)
committerMagnus Kühn <magnus.khn@gmail.com>
Sun, 28 Oct 2012 05:39:14 +0000 (06:39 +0100)
wcfsetup/install/files/js/WCF.js

index d0df0e1750e33756a7f749ce5ae39047b780d24f..998b90a22c7334246f491d38da0655c9378ac41d 100755 (executable)
@@ -6823,14 +6823,16 @@ $.widget('ui.wcfDialog', {
         * @param       jQuery          jqXHR
         */
        _success: function(data, textStatus, jqXHR) {
-               // initialize dialog content
-               this._initDialog(data);
-               
-               // remove loading overlay
-               this._content.removeClass('overlayLoading');
-               
-               if (this.options.success !== null && $.isFunction(this.options.success)) {
-                       this.options.success(data, textStatus, jqXHR);
+               if (this._isOpen) {
+                       // initialize dialog content
+                       this._initDialog(data);
+
+                       // remove loading overlay
+                       this._content.removeClass('overlayLoading');
+
+                       if (this.options.success !== null && $.isFunction(this.options.success)) {
+                               this.options.success(data, textStatus, jqXHR);
+                       }
                }
        },