[BUGFIX] Load CSH properly 19/38819/5
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Mon, 20 Apr 2015 07:50:29 +0000 (09:50 +0200)
committerMarkus Klein <klein.t3@reelworx.at>
Mon, 20 Apr 2015 14:07:47 +0000 (16:07 +0200)
The inline setting "moduleUrl" now gets written in the DocumentTemplate,
as it is also available in popups.

Resolves: #66481
Releases: master
Change-Id: I386df6c16bdf730aaddb09b668f743ce6e10877d
Reviewed-on: http://review.typo3.org/38819
Reviewed-by: Frans Saris <franssaris@gmail.com>
Tested-by: Frans Saris <franssaris@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/backend/Classes/Controller/BackendController.php
typo3/sysext/backend/Classes/Template/DocumentTemplate.php
typo3/sysext/backend/Resources/Public/JavaScript/ContextHelp.js

index 6802eef..07fa92e 100644 (file)
@@ -267,7 +267,6 @@ class BackendController {
                                console = TYPO3.Backend.DebugConsole;
                        }';
                $this->pageRenderer->addExtOnReadyCode($extOnReadyCode);
-               $this->pageRenderer->addInlineSetting('ContextHelp', 'moduleUrl', BackendUtility::getModuleUrl('help_cshmanual'));
                // Set document title:
                $title = $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] ? $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . ' [TYPO3 CMS ' . TYPO3_version . ']' : 'TYPO3 CMS ' . TYPO3_version;
                // Renders the module page
index 338570d..efcab9f 100644 (file)
@@ -1512,6 +1512,7 @@ function jumpToUrl(URL) {
         */
        protected function loadCshJavascript() {
                $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/ContextHelp');
+               $this->pageRenderer->addInlineSetting('ContextHelp', 'moduleUrl', BackendUtility::getModuleUrl('help_cshmanual'));
        }
 
        /**
index 426fec2..9ff4caf 100644 (file)
@@ -94,12 +94,13 @@ define('TYPO3/CMS/Backend/ContextHelp', ['jquery', 'TYPO3/CMS/Backend/Popover',
         * @param {object} $trigger
         */
        ContextHelp.showHelpPopup = function($trigger) {
-               var identifier = $trigger.data('table') + '.' + $trigger.data('field');
+               var identifier = $trigger.data('table') + '.' + $trigger.data('field'),
+                       configuration = top.TYPO3.configuration.ContextHelpWindows || top.TYPO3.configuration.PopupWindow;
                try {
                        var cshWindow = window.open(
                                ContextHelp.helpModuleUrl + '&tfID=' + identifier,
                                'ContextHelpWindow',
-                               'height=' + top.TYPO3.configuration.ContextHelpWindows.height + ',width=' + top.TYPO3.configuration.ContextHelpWindows.width + ',status=0,menubar=0,scrollbars=1'
+                               'height=' + configuration.height + ',width=' + configuration.width + ',status=0,menubar=0,scrollbars=1'
                        );
                        cshWindow.focus();
                        TYPO3.Popover.hide($trigger);