Follow-up to bug #11985: Move ExtJs CSS-assignment to renderJsKibraries
authorSteffen Kamper <info@sk-typo3.de>
Fri, 18 Sep 2009 09:32:06 +0000 (09:32 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Fri, 18 Sep 2009 09:32:06 +0000 (09:32 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5972 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_pagerenderer.php

index f3dad3d..66cf7f2 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2009-09-18  Steffen Kamper  <info@sk-typo3.de>
 
+       * Follow-up to bug #11985: Move ExtJs CSS-assignment to renderJsKibraries
        * Follow-up to bug #11985: backPath in FE is set too late
 
 2009-09-17  Steffen Kamper  <info@sk-typo3.de>
index d52ca9c..19a2982 100644 (file)
@@ -104,7 +104,10 @@ class t3lib_PageRenderer implements t3lib_Singleton {
        const EXTJS_ADAPTER_JQUERY = 'jquery';
        const EXTJS_ADAPTER_PROTOTYPE = 'prototype';
        const EXTJS_ADAPTER_YUI = 'yui';
-
+       
+       protected $extJStheme = TRUE;
+       protected $extJScss = TRUE;
+       
        protected $enableExtJSQuickTips = false;
 
        protected $inlineLanguageLabels = array ();
@@ -769,24 +772,10 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                                        break;
                        }
                }
-               if (!$this->addExtJS) {
-                       $this->addExtJS = TRUE;
-                       if ($theme) {
-                               if (isset($GLOBALS['TBE_STYLES']['extJS']['theme'])) {
-                                       $this->addCssFile($this->backPath . $GLOBALS['TBE_STYLES']['extJS']['theme'], 'stylesheet', 'screen', '', FALSE, TRUE);
-                               } else {
-                                       $this->addCssFile($this->backPath . 'contrib/extjs/resources/css/xtheme-blue.css', 'stylesheet', 'screen', '', FALSE, TRUE);
-                               }
-                       }
-                       if ($css) {
-                               if (isset($GLOBALS['TBE_STYLES']['extJS']['all'])) {
-                                       $this->addCssFile($this->backPath . $GLOBALS['TBE_STYLES']['extJS']['all'], 'stylesheet', 'screen', '', FALSE, TRUE);
-                               } else {
-                                       $this->addCssFile($this->backPath . 'contrib/extjs/resources/css/ext-all-notheme.css', 'stylesheet', 'screen', '', FALSE, TRUE);
-                               }
-                       }
-               
-               }
+               $this->addExtJS = TRUE;
+               $this->extJStheme = $theme;
+               $this->extJScss = $css;
+
        }
 
        /**
@@ -1188,6 +1177,22 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                                ($this->enableExtJSQuickTips ? 'Ext.QuickTips.init();' . chr(10) : '') . $code .
                                ' });' . $this->inlineJavascriptWrap[1];
                        unset ($this->extOnReadyCode);
+                       
+                       if ($this->extJStheme) {
+                               if (isset($GLOBALS['TBE_STYLES']['extJS']['theme'])) {
+                                       $this->addCssFile($this->backPath . $GLOBALS['TBE_STYLES']['extJS']['theme'], 'stylesheet', 'screen', '', FALSE, TRUE);
+                               } else {
+                                       $this->addCssFile($this->backPath . 'contrib/extjs/resources/css/xtheme-blue.css', 'stylesheet', 'screen', '', FALSE, TRUE);
+                               }
+                       }
+                       if ($this->extJScss) {
+                               if (isset($GLOBALS['TBE_STYLES']['extJS']['all'])) {
+                                       $this->addCssFile($this->backPath . $GLOBALS['TBE_STYLES']['extJS']['all'], 'stylesheet', 'screen', '', FALSE, TRUE);
+                               } else {
+                                       $this->addCssFile($this->backPath . 'contrib/extjs/resources/css/ext-all-notheme.css', 'stylesheet', 'screen', '', FALSE, TRUE);
+                               }
+                       }
+
                }
 
                return $out;