[BUGFIX] Open modal over complete backend and cleanup 81/37981/2
authorFrank Nägler <typo3@naegler.net>
Fri, 20 Mar 2015 21:40:59 +0000 (22:40 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Sun, 22 Mar 2015 16:18:57 +0000 (17:18 +0100)
Open modal over complete backend window and not only on
current frame. And cleanup the old HTML on dismiss by register
the event 'modal-dismiss'.

Resolves: #65878
Releases: master
Change-Id: I9f9284344021d73d39643aba443c14d5f39e2cbc
Reviewed-on: http://review.typo3.org/37981
Reviewed-by: Frans Saris <franssaris@gmail.com>
Tested-by: Frans Saris <franssaris@gmail.com>
Reviewed-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Tested-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Resources/Public/JavaScript/Modal.js

index 3ae3685..0a8f3d9 100644 (file)
@@ -131,14 +131,15 @@ define('TYPO3/CMS/Backend/Modal', ['jquery', 'TYPO3/CMS/Backend/FlashMessages'],
                        $(this).remove();
                        // Keep class modal-open on body tag as long as open modals exist
                        if (Modal.instances.length > 0) {
-                               $('body').addClass('modal-open');
+                               top.TYPO3.jQuery('body').addClass('modal-open');
                        }
                });
                Modal.currentModal.on('show.bs.modal', function(e) {
                        Modal.instances.push(Modal.currentModal);
                        Modal.center();
                });
-               $('body').append(Modal.currentModal);
+               Modal.currentModal.on('modal-dismiss', Modal.dismiss);
+               top.TYPO3.jQuery('body').append(Modal.currentModal);
                Modal.currentModal.modal();
 
                return Modal.currentModal;