Fixed bug #11933: FrontendEditing (classic) does not work when editing forms on page
authorSteffen Kamper <info@sk-typo3.de>
Sun, 20 Sep 2009 08:11:02 +0000 (08:11 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Sun, 20 Sep 2009 08:11:02 +0000 (08:11 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6004 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tceforms.php
typo3/template.php

index f7f0444..7d8d543 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-09-20  Steffen Kamper  <info@sk-typo3.de>
+
+       * Fixed bug #11933: FrontendEditing (classic) does not work when editing forms on page
+
 2009-09-19  Francois Suter  <francois@typo3.org>
 
        * Fixed bug #12011: Wrong layout of datepicker in the Scheduler
index 411efff..12e7974 100644 (file)
@@ -4281,6 +4281,7 @@ class t3lib_TCEforms      {
         */
        function getDynTabMenu($parts, $idString, $dividersToTabsBehaviour = 1) {
                if (is_object($GLOBALS['TBE_TEMPLATE'])) {
+                       $GLOBALS['TBE_TEMPLATE']->backPath = $this->backPath;
                        return $GLOBALS['TBE_TEMPLATE']->getDynTabMenu($parts, $idString, 0, false, 50, 1, false, 1, $dividersToTabsBehaviour);
                } else {
                        $output = '';
index 2a424b2..de92be6 100644 (file)
@@ -2149,7 +2149,6 @@ class mediumDoc extends template {
  * Extension class for "template" - used in the context of frontend editing.
  */
 class frontendDoc extends template {
-       var $backPath = 'typo3/';
 
        /**
         * Used in the frontend context to insert header data via TSFE->additionalHeaderData.
@@ -2158,13 +2157,38 @@ class frontendDoc extends template {
         * @return      void
         */
        public function insertHeaderData() {
-               $GLOBALS['TSFE']->additionalHeaderData['docStyle'] = $this->docStyle();
-               $GLOBALS['TSFE']->additionalHeaderData['JSLibraries'] = $this->renderJSlibraries();
-               $GLOBALS['TSFE']->additionalHeaderData['JScode'] = $this->JScode;
-               $GLOBALS['TSFE']->additionalHeaderData['JScodeArray'] = $this->wrapScriptTags(implode("\n", $this->JScodeArray));
 
-               if ($this->extJScode) {
-                       $GLOBALS['TSFE']->additionalHeaderData['extJScode'] = $this->wrapScriptTags('Ext.onReady(function() {' . chr(10) . $this->extJScode . chr(10) . '});');
+               /** @var $pageRenderer t3lib_PageRenderer */
+               $pageRenderer = $GLOBALS['TSFE']->getPageRenderer();
+
+               $this->backPath = $GLOBALS['TSFE']->backPath = TYPO3_mainDir;
+               $this->pageRenderer->setBackPath($this->backPath);
+               $this->docStyle();
+
+                       // add applied JS/CSS to $GLOBALS['TSFE']
+               if ($this->JScode) {
+                       $pageRenderer->addHeaderData($this->JScode);
+               }
+               if (count($this->JScodeArray)) {
+                       foreach ($this->JScodeArray as $name => $code) {
+                               $pageRenderer->addJsInlineCode($name, $code);   
+       }
+}
+
+               if ($this->addPrototype) {
+                       $pageRenderer->loadPrototype();
+               }
+               if ($this->addScriptaculous) {
+                       $pageRenderer->loadScriptaculous();
+               }
+               if ($this->addExtJS) {
+                       $pageRenderer->loadExtJs();
+               }
+               if ($this->inlineLanguageLabels) {
+                       $pageRenderer->addInlineLanguageLabelArray($this->inlineLanguageLabels);
+               }
+               if ($this->inlineSettings) {
+                       $pageRenderer->addInlineSettingArray($this->inlineSettings);
                }
        }
 }