Added loading() in wcfDialog
authorMagnus Kühn <magnus.khn@gmail.com>
Sat, 29 Dec 2012 14:36:13 +0000 (15:36 +0100)
committerMagnus Kühn <magnus.khn@gmail.com>
Sat, 29 Dec 2012 14:36:13 +0000 (15:36 +0100)
wcfsetup/install/files/js/WCF.js

index 4c1af8576e59ffbfb420581de32e027df61b1c2f..17dfeb13873f7e0428ae2977e9818c33163a52c5 100755 (executable)
@@ -7349,12 +7349,10 @@ $.widget('ui.wcfDialog', {
                                type: this.options.type,
                                url: this.options.url
                        });
+                       this.loading();
                        
                        // force open if using AJAX
                        this.options.autoOpen = true;
-                       
-                       // apply loading overlay
-                       this._content.addClass('overlayLoading');
                }
                
                if (this.options.autoOpen) {
@@ -7531,6 +7529,14 @@ $.widget('ui.wcfDialog', {
                return this._isOpen;
        },
        
+       /**
+        * Clears the dialog and applies a loading overlay
+        */
+       loading: function() {
+               this._content.addClass('overlayLoading');
+               this.render();
+       },
+       
        /**
         * Closes this dialog.
         */