[BUGFIX] Include CSS of AdminPanel only if shown 26/44726/3
authorGeorg Ringer <georg.ringer@gmail.com>
Sun, 15 Nov 2015 20:54:04 +0000 (21:54 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Sat, 21 Nov 2015 15:17:32 +0000 (16:17 +0100)
Include the CSS file only if the AdminPanel is rendered

Change-Id: If194cd8d36c34cc60a39924e5d021d7211808c82
Resolves: #68591
Releases: master
Reviewed-on: https://review.typo3.org/44726
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Josef Glatz <josef.glatz@typo3.org>
Reviewed-by: Martin Kutschker <martin.kutschker@ymail.com>
Tested-by: Martin Kutschker <martin.kutschker@ymail.com>
Tested-by: Gianluigi Martino <gmartino27@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/frontend/Classes/View/AdminPanelView.php
typo3/sysext/t3skin/ext_tables.php

index d5eef74..45517ea 100755 (executable)
@@ -335,7 +335,9 @@ class AdminPanelView
                                        TSFEtypo3FormFieldSet(theField, evallist, is_in, checkbox, checkboxValue);
                                }') . '/*]]>*/</script><script language="javascript" type="text/javascript">' . $this->extJSCODE . '</script>';
         }
+        $cssPath = htmlspecialchars($this->getTypoScriptFrontendController()->absRefPrefix . ExtensionManagementUtility::siteRelPath('t3skin')) . 'stylesheets/standalone/admin_panel.css';
         $out .= '<script src="' . GeneralUtility::locationHeaderUrl('typo3/sysext/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" />
 <!--
        TYPO3 admin panel end
 -->
index 3189f73..04871fd 100644 (file)
@@ -36,5 +36,4 @@ if (TYPO3_MODE === 'BE' || TYPO3_MODE === 'FE' && isset($GLOBALS['BE_USER'])) {
 
     // extJS theme
     $GLOBALS['TBE_STYLES']['extJS']['theme'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('t3skin') . 'extjs/xtheme-t3skin.css';
-    $GLOBALS['TBE_STYLES']['stylesheets']['admPanel'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath('t3skin') . 'stylesheets/standalone/admin_panel.css';
 }