[BUGFIX] Allow to add custom styles for admin panel 61/48061/5
authorZbigniew Jacko <z.jacko@macopedia.pl>
Tue, 10 May 2016 10:35:03 +0000 (13:35 +0300)
committerSusanne Moog <typo3@susannemoog.de>
Tue, 7 Jun 2016 14:17:27 +0000 (16:17 +0200)
Allow to add custom styles for admin panel, which are included
below the main styles.

Resolves: #76030
Releases: master, 7.6
Change-Id: If945982a3192f9fca8a008179f4b353eb2e65d76
Reviewed-on: https://review.typo3.org/48061
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Marcin Krzy┼╝anowski <m.krzyzanowski@macopedia.pl>
Tested-by: Marcin Krzy┼╝anowski <m.krzyzanowski@macopedia.pl>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Tested-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
typo3/sysext/frontend/Classes/Http/RequestHandler.php
typo3/sysext/frontend/Classes/View/AdminPanelView.php

index 04eb3e6..db5f424 100644 (file)
@@ -265,10 +265,6 @@ class RequestHandler implements RequestHandlerInterface
 
         // Admin panel
         if ($this->controller->isBackendUserLoggedIn() && $GLOBALS['BE_USER'] instanceof FrontendBackendUserAuthentication) {
-            if ($GLOBALS['BE_USER']->extAdmEnabled) {
-                // Style sheet is also used for frontend editing.
-                $this->controller->content = str_ireplace('</head>', $GLOBALS['BE_USER']->adminPanel->getAdminPanelHeaderData() . '</head>', $this->controller->content);
-            }
             if ($GLOBALS['BE_USER']->isAdminPanelVisible()) {
                 $this->controller->content = str_ireplace('</body>', $GLOBALS['BE_USER']->displayAdminPanel() . '</body>', $this->controller->content);
             }
index 846b8ce..ea3e8a1 100755 (executable)
@@ -338,11 +338,14 @@ class AdminPanelView
         }
         $cssPath = htmlspecialchars($this->getTypoScriptFrontendController()->absRefPrefix . ExtensionManagementUtility::siteRelPath('frontend')) . 'Resources/Public/Css/adminpanel.css';
         $out .= '<script src="' . GeneralUtility::locationHeaderUrl(ExtensionManagementUtility::siteRelPath('frontend') . 'Resources/Public/JavaScript/AdminPanel.js') . '" type="text/javascript"></script><script type="text/javascript">/*<![CDATA[*/' . 'typo3AdminPanel = new TYPO3AdminPanel();typo3AdminPanel.init("typo3-adminPanel-header", "TSFE_ADMIN_PANEL_FORM");' . '/*]]>*/</script>
-<link type="text/css" rel="stylesheet" href="' . $cssPath . '" media="all" />
+<link type="text/css" rel="stylesheet" href="' . $cssPath . '" media="all" />';
+        $out .= $this->getAdminPanelHeaderData();
+        $out .='
 <!--
        TYPO3 admin panel end
 -->
 ';
+
         return $out;
     }