[BUGFIX] EXT:form - open the ElementBrowser in modal window 15/54115/3
authorRalf Zimmermann <ralf.zimmermann@tritum.de>
Mon, 11 Sep 2017 11:50:23 +0000 (13:50 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Sun, 1 Oct 2017 12:09:49 +0000 (14:09 +0200)
Migrate the JS ElementBrowser to the modal which was introduced with
issue #82427.

Resolves: #82443
Releases: master
Change-Id: Ib71a15a7ce9638de4eb423d896fefa47bfa15e96
Reviewed-on: https://review.typo3.org/54115
Reviewed-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Tested-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/form/Resources/Public/JavaScript/Backend/FormEditor/InspectorComponent.js

index d8fae18..dcdc004 100644 (file)
@@ -25,8 +25,9 @@ define(['jquery',
         'TYPO3/CMS/Form/Backend/FormEditor/Helper',
         'TYPO3/CMS/Backend/Icons',
         'TYPO3/CMS/Backend/Notification',
+        'TYPO3/CMS/Backend/Modal',
         'TYPO3/CMS/Form/Backend/Vendor/jquery.mjs.nestedSortable'
-        ], function($, Helper, Icons, Notification) {
+        ], function($, Helper, Icons, Notification, Modal) {
         'use strict';
 
     return (function($, Helper, Icons, Notification) {
@@ -358,19 +359,13 @@ define(['jquery',
          *
          * @param string mode
          * @param string params
-         * @param int width
-         * @param int height
          */
-        function _openTypo3WinBrowser(mode, params, width, height) {
-            var openedPopupWindow, url;
-            url = TYPO3.settings.FormEditor.typo3WinBrowserUrl
-                + '&mode=' + mode + '&bparams=' + params;
-            openedPopupWindow = window.open(
-                url,
-                'Typo3WinBrowser',
-                'height=' + height + ',width=' + width + ',status=0,menubar=0,resizable=1,scrollbars=1'
-            );
-            openedPopupWindow.focus();
+        function _openTypo3WinBrowser(mode, params) {
+            Modal.advanced({
+                type: Modal.types.iframe,
+                content: TYPO3.settings.FormEditor.typo3WinBrowserUrl + '&mode=' + mode + '&bparams=' + params,
+                size: Modal.sizes.large
+            });
         };
 
         /**