[TASK] Remove hardcoded ContextHelpWindows settings 14/51214/3
authorWouter Wolters <typo3@wouterwolters.nl>
Mon, 9 Jan 2017 10:26:59 +0000 (11:26 +0100)
committerSusanne Moog <susanne.moog@typo3.org>
Mon, 9 Jan 2017 10:50:45 +0000 (11:50 +0100)
The values are hardcoded and not replaceable. We can put the
hardcoded values in JavaScript directly.

Resolves: #79215
Releases: master
Change-Id: I64742cef34b73d88bbc0f44cfc959556555b2fad
Reviewed-on: https://review.typo3.org/51214
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/backend/Classes/Controller/BackendController.php
typo3/sysext/backend/Resources/Public/JavaScript/ContextHelp.js
typo3/sysext/workspaces/Classes/Controller/PreviewController.php

index d292901..c4935cc 100644 (file)
@@ -585,11 +585,7 @@ class BackendController
             'uniqueID' => GeneralUtility::shortMD5(uniqid('', true)),
             'pageModule' => $pageModule,
             'inWorkspace' => $beUser->workspace !== 0,
-            'showRefreshLoginPopup' => isset($GLOBALS['TYPO3_CONF_VARS']['BE']['showRefreshLoginPopup']) ? (int)$GLOBALS['TYPO3_CONF_VARS']['BE']['showRefreshLoginPopup'] : false,
-            'ContextHelpWindows' => [
-                'width' => 600,
-                'height' => 400
-            ]
+            'showRefreshLoginPopup' => isset($GLOBALS['TYPO3_CONF_VARS']['BE']['showRefreshLoginPopup']) ? (int)$GLOBALS['TYPO3_CONF_VARS']['BE']['showRefreshLoginPopup'] : false
         ];
         $this->js .= '
        TYPO3.configuration = ' . json_encode($t3Configuration) . ';
index ba41c0f..c2730df 100644 (file)
@@ -106,14 +106,13 @@ define(['jquery', 'TYPO3/CMS/Backend/Popover', 'bootstrap'], function($) {
         * @param {Object} $trigger
         */
        ContextHelp.showHelpPopup = function($trigger) {
-               var configuration = top.TYPO3.configuration.ContextHelpWindows;
                try {
                        var cshWindow = window.open(
                                ContextHelp.helpModuleUrl +
                                        '&tx_cshmanual_help_cshmanualcshmanual[table]=' + $trigger.data('table') +
                                        '&tx_cshmanual_help_cshmanualcshmanual[field]=' + $trigger.data('field'),
                                'ContextHelpWindow',
-                               'height=' + configuration.height + ',width=' + configuration.width + ',status=0,menubar=0,scrollbars=1'
+                               'height=400,width=600,status=0,menubar=0,scrollbars=1'
                        );
                        cshWindow.focus();
                        TYPO3.Popover.hide($trigger);
index 41345ab..e713dde 100644 (file)
@@ -225,11 +225,7 @@ class PreviewController extends AbstractController
             'uniqueID' => GeneralUtility::shortMD5(uniqid('', true)),
             'pageModule' => $pageModule,
             'inWorkspace' => $backendUser->workspace !== 0,
-            'showRefreshLoginPopup' => isset($GLOBALS['TYPO3_CONF_VARS']['BE']['showRefreshLoginPopup']) ? (int)$GLOBALS['TYPO3_CONF_VARS']['BE']['showRefreshLoginPopup'] : false,
-            'ContextHelpWindows' => [
-                'width' => 600,
-                'height' => 400
-            ]
+            'showRefreshLoginPopup' => isset($GLOBALS['TYPO3_CONF_VARS']['BE']['showRefreshLoginPopup']) ? (int)$GLOBALS['TYPO3_CONF_VARS']['BE']['showRefreshLoginPopup'] : false
         ];
 
         return '