Fixed bug: #16524: No inline relation to tables with tabs possible
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_tceforms_inline.php
index ac34f8b..88d3525 100644 (file)
@@ -2524,7 +2524,7 @@ class t3lib_TCEforms_inline {
         */
        protected function getHeadTags() {
                $headTags = array();
-               $headDataRaw = $this->fObj->JStop();
+               $headDataRaw = $this->fObj->JStop() . $this->getJavaScriptAndStyleSheetsOfPageRenderer();
 
                if ($headDataRaw) {
                                // Create instance of the HTML parser:
@@ -2552,6 +2552,24 @@ class t3lib_TCEforms_inline {
                return $headTags;
        }
 
+       /**
+        * Gets the JavaScript of the pageRenderer.
+        * This can be used to extract newly added files which have been added
+        * during an AJAX request. Due to the spread possibilities of the pageRenderer
+        * to add JavaScript rendering and extracting seems to be the easiest way.
+        *
+        * @return string
+        */
+       protected function getJavaScriptAndStyleSheetsOfPageRenderer() {
+               /** @var $pageRenderer t3lib_PageRenderer */
+               $pageRenderer = clone $GLOBALS['SOBE']->doc->getPageRenderer();
+
+               $pageRenderer->setTemplateFile(TYPO3_mainDir . 'templates/helper_javascript_css.html');
+               $javaScriptAndStyleSheets = $pageRenderer->render();
+
+               return $javaScriptAndStyleSheets;
+       }
+
 
        /**
         * Wraps a text with an anchor and returns the HTML representation.