Added feature #13580: htmlArea RTE: Extjize the RTE
[Packages/TYPO3.CMS.git] / typo3 / sysext / rtehtmlarea / pi2 / class.tx_rtehtmlarea_pi2.php
index dc5abab..3e324c3 100644 (file)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 2005-2009 Stanislas Rolland <typo3(arobas)sjbr.ca>
+*  (c) 2005-2010 Stanislas Rolland <typo3(arobas)sjbr.ca>
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -217,14 +217,28 @@ class tx_rtehtmlarea_pi2 extends tx_rtehtmlarea_base {
                 * LOAD JS, CSS and more
                 * =======================================
                 */
+               $pageRenderer = $GLOBALS['TSFE']->getPageRenderer();
+               $pageRenderer->setBackPath(TYPO3_mainDir);
                        // Preloading the pageStyle and including RTE skin stylesheets
                $this->addPageStyle();
                $this->addSkin();
+               $pageRenderer->addCssFile($this->hostURL . '/t3lib/js/extjs/ux/resize.css');
                        // Loading JavaScript files and code
+               $pageRenderer->loadExtJs();
+               $pageRenderer->enableExtJSQuickTips();
+               if (!$GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['enableCompressedScripts']) {
+                       $pageRenderer->enableExtJsDebug();
+               }
+               $pageRenderer->addJsFile($this->hostURL . '/t3lib/js/extjs/ux/ext.resizable.js');
                if ($this->TCEform->RTEcounter == 1) {
-                       $this->TCEform->additionalJS_initial = $this->loadJSfiles($this->TCEform->RTEcounter);
                        $this->TCEform->additionalJS_pre['rtehtmlarea-loadJScode'] = $this->loadJScode($this->TCEform->RTEcounter);
                }
+               $this->TCEform->additionalJS_initial = $this->loadJSfiles($this->TCEform->RTEcounter);
+               $resizableSettings = array(
+                       'textareaResize' => true,
+                       'textareaMaxHeight' => '600'
+               );
+               $pageRenderer->addInlineSettingArray('', $resizableSettings);
 
                /* =======================================
                 * DRAW THE EDITOR