Added ability to move a dialog into body-tag
authorAlexander Ebert <ebert@woltlab.com>
Tue, 25 Oct 2011 14:12:51 +0000 (16:12 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 25 Oct 2011 14:12:51 +0000 (16:12 +0200)
wcfsetup/install/files/js/WCF.js

index 3d6c16c1217bbdf2fd6f07c5aecc394f6e6de282..da995d20424933b7baba7a55e5f7e86d67ba6baf 100644 (file)
@@ -388,13 +388,17 @@ $.extend(WCF, {
        /**
         * Shows a modal dialog.
         * @param       string          dialogID
+        * @param       boolean         moveToBody
         */
-       showDialog: function(dialogID) {
+       showDialog: function(dialogID, moveToBody) {
                // we cannot work with a non-existant dialog, if you wish to
                // load content via AJAX, see showAJAXDialog() instead
                if (!$.wcfIsset(dialogID)) return;
                
                var $dialog = $('#' + $.wcfEscapeID(dialogID));
+               if (moveToBody) {
+                       $dialog.remove().appendTo($('body'));
+               }
                
                var dialogOptions = arguments[2] || {};
                $dialog.wcfDialog(dialogOptions);