Bug #21041 » 11933.diff
typo3/template.php (working copy) | ||
---|---|---|
* 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.
|
||
... | ... | |
* @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));
|
||
$this->backPath = 'typo3/';
|
||
$headerData = array();
|
||
$headerData['docStyle'] = $this->docStyle();
|
||
$headerData['JSLibraries'] = $this->renderJSlibraries();
|
||
$headerData['JScode'] = $this->JScode;
|
||
$headerData['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) . '});');
|
||
$headerData['extJScode'] = $this->wrapScriptTags('Ext.onReady(function() {' . chr(10) . $this->extJScode . chr(10) . '});');
|
||
}
|
||
$GLOBALS['TSFE']->additionalHeaderData = array_merge($headerData, (array) $GLOBALS['TSFE']->additionalHeaderData);
|
||
}
|
||
}
|
||