From 4c9ca71646aa3d9b2f6266b90b9f083c27a76789 Mon Sep 17 00:00:00 2001 From: Steffen Kamper Date: Sat, 27 Jun 2009 20:04:10 +0000 Subject: [PATCH] Fixed bug #11409: backend.php don't use API to include JS/CSS files git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5646 709f56b5-9817-0410-a4d7-c38de5d9e867 --- ChangeLog | 4 ++++ typo3/backend.php | 25 +++++++------------------ 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 424b20b29dcc..fbf93c2f0d54 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-06-27 Steffen Kamper + + * Fixed bug #11409: backend.php don't use API to include JS/CSS files + 2009-06-27 Benjamin Mack * Added #4361: Added new hook in class.db_list.inc for the list module (On behalf of Michael Stucki) diff --git a/typo3/backend.php b/typo3/backend.php index aa9bd98270e7..bd45368cf250 100644 --- a/typo3/backend.php +++ b/typo3/backend.php @@ -91,10 +91,6 @@ class TYPO3backend { // add default BE javascript $this->js = ''; $this->jsFiles = array( - 'contrib/prototype/prototype.js', - 'contrib/scriptaculous/scriptaculous.js?load=builder,effects,controls,dragdrop', - 'contrib/extjs/adapter/ext/ext-base.js', - 'contrib/extjs/ext-all.js', 'contrib/swfupload/swfupload.js', 'contrib/swfupload/plugins/swfupload.swfobject.js', 'contrib/swfupload/plugins/swfupload.cookies.js', @@ -118,8 +114,6 @@ class TYPO3backend { 'backend-scaffolding' => 'css/backend-scaffolding.css', 'backend-style' => 'css/backend-style.css', 'modulemenu' => 'css/modulemenu.css', - 'extJS' => 'contrib/extjs/resources/css/ext-all.css', - 'extJS-gray' => 'contrib/extjs/resources/css/xtheme-gray.css' ); $this->toolbarItems = array(); @@ -211,13 +205,15 @@ class TYPO3backend { * now put the complete backend document together ******************************************************/ + $GLOBALS['TBE_TEMPLATE']->loadScriptaculous('builder,effects,controls,dragdrop'); + $GLOBALS['TBE_TEMPLATE']->loadExtJS(); + // remove duplicate entries $this->jsFiles = array_unique($this->jsFiles); // add javascript foreach($this->jsFiles as $jsFile) { - $GLOBALS['TBE_TEMPLATE']->JScode .= ' - '; + $GLOBALS['TBE_TEMPLATE']->loadJavascriptLib($jsFile); } $GLOBALS['TBE_TEMPLATE']->JScode .= chr(10); $this->generateJavascript(); @@ -231,23 +227,16 @@ class TYPO3backend { // FIXME abusing the JS container to add CSS, need to fix template.php foreach($this->cssFiles as $cssFileName => $cssFile) { - $GLOBALS['TBE_TEMPLATE']->JScode .= ' - - '; + $GLOBALS['TBE_TEMPLATE']->addStyleSheet($cssFileName, $cssFile); // load addditional css files to overwrite existing core styles if(!empty($GLOBALS['TBE_STYLES']['stylesheets'][$cssFileName])) { - $GLOBALS['TBE_TEMPLATE']->JScode .= ' - - '; + $GLOBALS['TBE_TEMPLATE']->addStyleSheet($cssFileName . 'TBE_STYLES', $GLOBALS['TBE_STYLES']['stylesheets'][$cssFileName]); } } if(!empty($this->css)) { - $GLOBALS['TBE_TEMPLATE']->JScode .= ' - '; + $GLOBALS['TBE_TEMPLATE']->inDocStylesArray['backend.php'] = $this->css; } // set document title: -- 2.20.1