[BUGFIX] Browse for records in edit document popup works again 89/37089/4
authorMichael Oehlhof <typo3@oehlhof.de>
Sun, 22 Feb 2015 02:01:01 +0000 (03:01 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 28 Feb 2015 17:34:20 +0000 (18:34 +0100)
When editing a group in the edit document popup the browse for records
button was without function, this is now fixed.

Resolves: #65215
Releases: master
Change-Id: I1bed83669d8a62f193f6b92d3fd3a39f5250707f
Reviewed-on: http://review.typo3.org/37089
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/backend/Classes/Controller/BackendController.php
typo3/sysext/backend/Classes/Controller/EditDocumentController.php

index 8dd1a57..afe7eeb 100644 (file)
@@ -485,12 +485,12 @@ class BackendController {
                $dateFormat = ($GLOBALS['TYPO3_CONF_VARS']['SYS']['USdateFormat'] ? array('MM-DD-YYYY', 'HH:mm MM-DD-YYYY') : array('DD-MM-YYYY', 'HH:mm DD-MM-YYYY'));
                $this->pageRenderer->addInlineSetting('DateTimePicker', 'DateFormat', $dateFormat);
                // define the window size of the element browser etc.
                $dateFormat = ($GLOBALS['TYPO3_CONF_VARS']['SYS']['USdateFormat'] ? array('MM-DD-YYYY', 'HH:mm MM-DD-YYYY') : array('DD-MM-YYYY', 'HH:mm DD-MM-YYYY'));
                $this->pageRenderer->addInlineSetting('DateTimePicker', 'DateFormat', $dateFormat);
                // define the window size of the element browser etc.
+               $popupWindowWidth  = 700;
+               $popupWindowHeight = 750;
                $popupWindowSize = trim($GLOBALS['BE_USER']->getTSConfigVal('options.popupWindowSize'));
                if (!empty($popupWindowSize)) {
                $popupWindowSize = trim($GLOBALS['BE_USER']->getTSConfigVal('options.popupWindowSize'));
                if (!empty($popupWindowSize)) {
-                       list($popupWindowWidth, $popupWindowHeight) = GeneralUtility::trimExplode('x', $popupWindowSize);
+                       list($popupWindowWidth, $popupWindowHeight) = GeneralUtility::intExplode('x', $popupWindowSize);
                }
                }
-               $popupWindowWidth  = !empty($popupWindowWidth) ? (int)$popupWindowWidth : 700;
-               $popupWindowHeight = !empty($popupWindowHeight) ? (int)$popupWindowHeight : 750;
 
                // define the window size of the popups within the RTE
                $rtePopupWindowSize = trim($GLOBALS['BE_USER']->getTSConfigVal('options.rte.popupWindowSize'));
 
                // define the window size of the popups within the RTE
                $rtePopupWindowSize = trim($GLOBALS['BE_USER']->getTSConfigVal('options.rte.popupWindowSize'));
index c21b509..cf69f65 100644 (file)
@@ -660,7 +660,21 @@ class EditDocumentController {
                                }
                        }
 ';
                                }
                        }
 ';
+               // define the window size of the element browser
+               $popupWindowWidth  = 700;
+               $popupWindowHeight = 750;
+               $popupWindowSize = trim($GLOBALS['BE_USER']->getTSConfigVal('options.popupWindowSize'));
+               if (!empty($popupWindowSize)) {
+                       list($popupWindowWidth, $popupWindowHeight) = GeneralUtility::intExplode('x', $popupWindowSize);
+               }
+               $t3Configuration = array(
+                       'PopupWindow' => array(
+                               'width' => $popupWindowWidth,
+                               'height' => $popupWindowHeight
+                       ),
+               );
                $this->doc->JScode = $this->doc->wrapScriptTags('
                $this->doc->JScode = $this->doc->wrapScriptTags('
+                               TYPO3.configuration = ' . json_encode($t3Configuration) . ';
                                // Object: TS:
                                // passwordDummy and decimalSign are used by tbe_editor.js and have to be declared here as
                                // TS object overwrites the object declared in tbe_editor.js
                                // Object: TS:
                                // passwordDummy and decimalSign are used by tbe_editor.js and have to be declared here as
                                // TS object overwrites the object declared in tbe_editor.js