Cleanup #12020: Made proper use of t3lib_pageRenderer for all inclusions of JS and...
authorFrancois Suter <francois.suter@typo3.org>
Sun, 20 Sep 2009 20:44:58 +0000 (20:44 +0000)
committerFrancois Suter <francois.suter@typo3.org>
Sun, 20 Sep 2009 20:44:58 +0000 (20:44 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6024 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/scheduler/ChangeLog
typo3/sysext/scheduler/mod1/index.php

index 1604440..3c02b1d 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,7 @@
        * Fixed bug #11224: Special menu directory only renders 1st level if special.value is a mount point (thanks to Xavier Perseguers)
        * Cleanup #11989: Install Tool message colors should match flash message colors
        * Cleanup #12018: Added an icon for notice-level flash messages
+       * Cleanup #12020: Made proper use of t3lib_pageRenderer for all inclusions of JS and CSS files in the Scheduler's BE module
 
 2009-09-20  Benjamin Mack  <benni@typo3.org>
 
index 80b7ed9..26cdd68 100755 (executable)
@@ -1,6 +1,7 @@
 2009-09-20  Francois Suter  <francois@typo3.org>
 
        * Fixed bug #12010: Task uid should be displayed BE module list view
+       * Cleanup #12020: Made proper use of t3lib_pageRenderer for all inclusions of JS and CSS files
 
 2009-09-19  Francois Suter  <francois@typo3.org>
 
index 3accd34..c904776 100755 (executable)
@@ -95,7 +95,7 @@ class tx_scheduler_Module extends t3lib_SCbase {
                        // Initialize document
                $this->doc = t3lib_div::makeInstance('template');
                $this->doc->setModuleTemplate(t3lib_extMgm::extPath('scheduler') . 'mod1/mod_template.html');
-               $this->doc->addStyleSheet('tx_scheduler', t3lib_extMgm::extRelPath('scheduler') . 'res/tx_scheduler_be.css');
+               $this->doc->getPageRenderer()->addCssFile(t3lib_extMgm::extRelPath('scheduler') . 'res/tx_scheduler_be.css');
                $this->doc->backPath = $this->backPath;
                $this->doc->bodyTagId = 'typo3-mod-php';
                $this->doc->bodyTagAdditions = 'class="tx_scheduler_mod1"';
@@ -602,10 +602,10 @@ class tx_scheduler_Module extends t3lib_SCbase {
                }
 
                        // Load necessary JavaScript
-               /** @var $pageRenderer t3lib_PageRenderer */
+                       /** @var $pageRenderer t3lib_PageRenderer */
                $pageRenderer = $this->doc->getPageRenderer();
                $pageRenderer->loadExtJS();
-               $this->doc->loadJavascriptLib(t3lib_extMgm::extRelPath('scheduler') . 'res/tx_scheduler_be.js');
+               $pageRenderer->addJsFile(t3lib_extMgm::extRelPath('scheduler') . 'res/tx_scheduler_be.js');
                $pageRenderer->addJsFile($this->backPath . '../t3lib/js/extjs/tceforms.js');
 
                        // Define settings for Date Picker
@@ -836,8 +836,10 @@ class tx_scheduler_Module extends t3lib_SCbase {
                        $registeredClasses = self::getRegisteredClasses();
 
                                // Load ExtJS framework and specific JS library
-                       $this->doc->getPageRenderer()->loadExtJS();
-                       $this->doc->loadJavascriptLib(t3lib_extMgm::extRelPath('scheduler') . 'res/tx_scheduler_be.js');
+                               /** @var $pageRenderer t3lib_PageRenderer */
+                       $pageRenderer = $this->doc->getPageRenderer();
+                       $pageRenderer->loadExtJS();
+                       $pageRenderer->addJsFile(t3lib_extMgm::extRelPath('scheduler') . 'res/tx_scheduler_be.js');
 
                                // Initialise table layout
                        $tableLayout = array(