changed the way how javascritp and css files needed to be referenced when adding...
authorIngo Renner <ingo.renner@typo3.org>
Sun, 20 Jan 2008 15:21:58 +0000 (15:21 +0000)
committerIngo Renner <ingo.renner@typo3.org>
Sun, 20 Jan 2008 15:21:58 +0000 (15:21 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2934 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/backend.php
typo3/classes/class.backendsearchmenu.php
typo3/classes/class.clearcachemenu.php
typo3/classes/class.shortcutmenu.php

index b35508b..154a048 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,7 @@
        * fixed bug #7211: "Start in Module" does not work anymore
        * fixed check for wrong implementation of toolbarItem interface
        * renamed typo3/css/verticalmenu.css to modulemenu.css
+       * changed the way how javascritp and css files needed to be referenced when adding them to backend.php, now relative to typo3/
 
 2008-01-19  Stanislas Rolland  <stanislas.rolland@fructifor.ca>
 
index 409a5ce..05bb51c 100644 (file)
@@ -667,12 +667,7 @@ class TYPO3backend {
                $jsFileAdded = false;
 
                        //TODO add more checks if neccessary
-               if(file_exists(t3lib_div::resolveBackPath(PATH_site.$javascriptFile))) {
-
-                       if(t3lib_div::isFirstPartOfStr($javascriptFile, 'typo3/')) {
-                               $javascriptFile = substr($javascriptFile, 6); // make relative to typo3/
-                       }
-
+               if(file_exists(t3lib_div::resolveBackPath(PATH_typo3.$javascriptFile))) {
                        $this->jsFiles[] = $javascriptFile;
                        $jsFileAdded     = true;
                }
@@ -705,12 +700,7 @@ class TYPO3backend {
                $cssFileAdded = false;
 
                        //TODO add more checks if neccessary
-               if(file_exists(t3lib_div::resolveBackPath(PATH_site.$cssFile))) {
-
-                       if(t3lib_div::isFirstPartOfStr($cssFile, 'typo3/')) {
-                               $cssFile = substr($cssFile, 6); // make relative to typo3/
-                       }
-
+               if(file_exists(t3lib_div::resolveBackPath(PATH_typo3.$cssFile))) {
                                // prevent overwriting existing css files
                        if(empty($this->cssFiles[$cssFileName])) {
                                $this->cssFiles[$cssFileName] = $cssFile;
index 5318989..13835ca 100644 (file)
@@ -77,7 +77,7 @@ class BackendSearchMenu implements backend_toolbarItem {
         * @return      void
         */
        private function addJavascriptToBackend() {
-               $this->backendReference->addJavascriptFile('typo3/js/backendsearch.js');
+               $this->backendReference->addJavascriptFile('js/backendsearch.js');
        }
 
        /**
index 3bb83c1..64f74c6 100644 (file)
@@ -123,7 +123,7 @@ class ClearCacheMenu implements backend_toolbarItem {
         * @return      void
         */
        private function addJavascriptToBackend() {
-               $this->backendReference->addJavascriptFile('typo3/js/clearcachemenu.js');
+               $this->backendReference->addJavascriptFile('js/clearcachemenu.js');
        }
 
        /**
index 38b7848..232c850 100644 (file)
@@ -212,7 +212,7 @@ class ShortcutMenu implements backend_toolbarItem {
         * @return      void
         */
        private function addJavascriptToBackend() {
-               $this->backendReference->addJavascriptFile('typo3/js/shortcutmenu.js');
+               $this->backendReference->addJavascriptFile('js/shortcutmenu.js');
        }
 
        /**