Feature #21872 ยป 13074_feature_stdWrapPageRenderer.diff
typo3/sysext/cms/tslib/class.tslib_pagegen.php (working copy) | ||
---|---|---|
$GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['title'] ? $GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['title'] : '',
|
||
$GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['compress'] ? TRUE : FALSE,
|
||
$GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['forceOnTop'] ? TRUE : FALSE,
|
||
$GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['allWrap']);
|
||
$GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['allWrap'],
|
||
$GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['stdWrap.']
|
||
);
|
||
}
|
||
}
|
||
}
|
||
... | ... | |
htmlspecialchars($type),
|
||
$GLOBALS['TSFE']->pSetup['includeJSlibs.'][$key . '.']['compress'] ? TRUE : FALSE,
|
||
$GLOBALS['TSFE']->pSetup['includeJSlibs.'][$key . '.']['forceOnTop'] ? TRUE : FALSE,
|
||
$GLOBALS['TSFE']->pSetup['includeJSlibs.'][$key . '.']['allWrap']
|
||
$GLOBALS['TSFE']->pSetup['includeJSlibs.'][$key . '.']['allWrap'],
|
||
$GLOBALS['TSFE']->pSetup['includeJSlibs.'][$key . '.']['stdWrap.']
|
||
);
|
||
}
|
||
}
|
||
... | ... | |
htmlspecialchars($type),
|
||
$GLOBALS['TSFE']->pSetup['includeJSFooterlibs.'][$key . '.']['compress'] ? TRUE : FALSE,
|
||
$GLOBALS['TSFE']->pSetup['includeJSFooterlibs.'][$key . '.']['forceOnTop'] ? TRUE : FALSE,
|
||
$GLOBALS['TSFE']->pSetup['includeJSFooterlibs.'][$key . '.']['allWrap']
|
||
$GLOBALS['TSFE']->pSetup['includeJSFooterlibs.'][$key . '.']['allWrap'],
|
||
$GLOBALS['TSFE']->pSetup['includeJSFooterlibs.'][$key . '.']['stdWrap.']
|
||
);
|
||
}
|
||
}
|
||
... | ... | |
htmlspecialchars($type),
|
||
$GLOBALS['TSFE']->pSetup['includeJS.'][$key . '.']['compress'] ? TRUE : FALSE,
|
||
$GLOBALS['TSFE']->pSetup['includeJS.'][$key . '.']['forceOnTop'] ? TRUE : FALSE,
|
||
$GLOBALS['TSFE']->pSetup['includeJS.'][$key . '.']['allWrap']
|
||
$GLOBALS['TSFE']->pSetup['includeJS.'][$key . '.']['allWrap'],
|
||
$GLOBALS['TSFE']->pSetup['includeJS.'][$key . '.']['stdWrap.']
|
||
);
|
||
}
|
||
}
|
||
... | ... | |
htmlspecialchars($type),
|
||
$GLOBALS['TSFE']->pSetup['includeJSFooter.'][$key . '.']['compress'] ? TRUE : FALSE,
|
||
$GLOBALS['TSFE']->pSetup['includeJSFooter.'][$key . '.']['forceOnTop'] ? TRUE : FALSE,
|
||
$GLOBALS['TSFE']->pSetup['includeJSFooter.'][$key . '.']['allWrap']
|
||
$GLOBALS['TSFE']->pSetup['includeJSFooter.'][$key . '.']['allWrap'],
|
||
$GLOBALS['TSFE']->pSetup['includeJSFooter.'][$key . '.']['stdWrap.']
|
||
);
|
||
}
|
||
}
|
t3lib/class.t3lib_pagerenderer.php (working copy) | ||
---|---|---|
*/
|
||
class t3lib_PageRenderer implements t3lib_Singleton {
|
||
protected $cObj;
|
||
|
||
protected $compressJavascript = FALSE;
|
||
protected $compressCss = FALSE;
|
||
protected $removeLineBreaksFromTemplate = FALSE;
|
||
... | ... | |
$this->reset();
|
||
$this->csConvObj = t3lib_div::makeInstance('t3lib_cs');
|
||
$this->cObj = t3lib_div::makeInstance('tslib_cObj');
|
||
if (strlen($templateFile)) {
|
||
$this->templateFile = $templateFile;
|
||
... | ... | |
* @param boolean $compress flag if library should be compressed
|
||
* @param boolean $forceOnTop flag if added library should be inserted at begin of this block
|
||
* @param string $allWrap
|
||
* @param array $stdWrap stdWrap options
|
||
* @return void
|
||
*/
|
||
public function addJsLibrary($name, $file, $type = 'text/javascript', $compress = FALSE, $forceOnTop = FALSE, $allWrap = '') {
|
||
public function addJsLibrary($name, $file, $type = 'text/javascript', $compress = FALSE, $forceOnTop = FALSE, $allWrap = '', $stdWrap=array()) {
|
||
if (!in_array(strtolower($name), $this->jsLibs)) {
|
||
$this->jsLibs[strtolower($name)] = array (
|
||
'file' => $file,
|
||
... | ... | |
'section' => self::PART_HEADER,
|
||
'compress' => $compress,
|
||
'forceOnTop' => $forceOnTop,
|
||
'allWrap' => $allWrap
|
||
'allWrap' => $allWrap,
|
||
'stdWrap' => $stdWrap
|
||
);
|
||
}
|
||
... | ... | |
* @param boolean $compress flag if library should be compressed
|
||
* @param boolean $forceOnTop flag if added library should be inserted at begin of this block
|
||
* @param string $allWrap
|
||
* @param array $stdWrap stdWrap options
|
||
* @return void
|
||
*/
|
||
public function addJsFooterLibrary($name, $file, $type = 'text/javascript', $compress = FALSE, $forceOnTop = FALSE, $allWrap = '') {
|
||
public function addJsFooterLibrary($name, $file, $type = 'text/javascript', $compress = FALSE, $forceOnTop = FALSE, $allWrap = '', $stdWrap = array()) {
|
||
if (!in_array(strtolower($name), $this->jsLibs)) {
|
||
$this->jsLibs[strtolower($name)] = array (
|
||
'file' => $file,
|
||
... | ... | |
'section' => self::PART_FOOTER,
|
||
'compress' => $compress,
|
||
'forceOnTop' => $forceOnTop,
|
||
'allWrap' => $allWrap
|
||
'allWrap' => $allWrap,
|
||
'stdWrap' => $stdWrap
|
||
);
|
||
}
|
||
... | ... | |
* @param boolean $compress
|
||
* @param boolean $forceOnTop
|
||
* @param string $allWrap
|
||
* @param array $stdWrap stdWrap options
|
||
* @return void
|
||
*/
|
||
public function addJsFile($file, $type = 'text/javascript', $compress = TRUE, $forceOnTop = FALSE, $allWrap = '') {
|
||
public function addJsFile($file, $type = 'text/javascript', $compress = TRUE, $forceOnTop = FALSE, $allWrap = '', $stdWrap = array()) {
|
||
if (!isset($this->jsFiles[$file])) {
|
||
$this->jsFiles[$file] = array (
|
||
'type' => $type,
|
||
'section' => self::PART_HEADER,
|
||
'compress' => $compress,
|
||
'forceOnTop' => $forceOnTop,
|
||
'allWrap' => $allWrap
|
||
'allWrap' => $allWrap,
|
||
'stdWrap' => $stdWrap
|
||
);
|
||
}
|
||
}
|
||
... | ... | |
* @param string $type
|
||
* @param boolean $compress
|
||
* @param boolean $forceOnTop
|
||
* @param array $stdWrap stdWrap options
|
||
* @return void
|
||
*/
|
||
public function addJsFooterFile($file, $type = 'text/javascript', $compress = TRUE, $forceOnTop = FALSE, $allWrap = '') {
|
||
public function addJsFooterFile($file, $type = 'text/javascript', $compress = TRUE, $forceOnTop = FALSE, $allWrap = '', $stdWrap = array()) {
|
||
if (!isset($this->jsFiles[$file])) {
|
||
$this->jsFiles[$file] = array (
|
||
'type' => $type,
|
||
'section' => self::PART_FOOTER,
|
||
'compress' => $compress,
|
||
'forceOnTop' => $forceOnTop,
|
||
'allWrap' => $allWrap
|
||
'allWrap' => $allWrap,
|
||
'stdWrap' => $stdWrap
|
||
);
|
||
}
|
||
}
|
||
... | ... | |
* @param string $title
|
||
* @param boolean $compress
|
||
* @param boolean $forceOnTop
|
||
* @param string $allWrap
|
||
* @param array $stdWrap stdWrap options
|
||
* @return void
|
||
*/
|
||
public function addCssFile($file, $rel = 'stylesheet', $media = 'screen', $title = '', $compress = TRUE, $forceOnTop = FALSE, $allWrap = '') {
|
||
public function addCssFile($file, $rel = 'stylesheet', $media = 'screen', $title = '', $compress = TRUE, $forceOnTop = FALSE, $allWrap = '', $stdWrap = array()) {
|
||
if (!isset($this->cssFiles[$file])) {
|
||
$this->cssFiles[$file] = array (
|
||
'rel' => $rel,
|
||
... | ... | |
'title' => $title,
|
||
'compress' => $compress,
|
||
'forceOnTop' => $forceOnTop,
|
||
'allWrap' => $allWrap
|
||
'allWrap' => $allWrap,
|
||
'stdWrap' => $stdWrap
|
||
);
|
||
}
|
||
}
|
||
... | ... | |
if ($properties['allWrap'] && strpos($properties['allWrap'], '|') !== FALSE) {
|
||
$tag = str_replace('|', $tag, $properties['allWrap']);
|
||
}
|
||
if ($properties['stdWrap']) {
|
||
$tag = $this->cObj->stdWrap($tag, $properties['stdWrap']);
|
||
}
|
||
if ($properties['forceOnTop']) {
|
||
$cssFiles = $tag . chr(10) . $cssFiles;
|
||
} else {
|
||
... | ... | |
if ($properties['allWrap'] && strpos($properties['allWrap'], '|') !== FALSE) {
|
||
$tag = str_replace('|', $tag, $properties['allWrap']);
|
||
}
|
||
if ($properties['stdWrap']) {
|
||
$tag = $this->cObj->stdWrap($tag, $properties['stdWrap']);
|
||
}
|
||
if ($properties['forceOnTop']) {
|
||
if ($properties['section'] === self::PART_HEADER) {
|
||
$jsLibs = $tag . chr(10) . $jsLibs;
|
||
... | ... | |
if ($properties['allWrap'] && strpos($properties['allWrap'], '|') !== FALSE) {
|
||
$tag = str_replace('|', $tag, $properties['allWrap']);
|
||
}
|
||
if ($properties['stdWrap']) {
|
||
$tag = $this->cObj->stdWrap($tag, $properties['stdWrap']);
|
||
}
|
||
if ($properties['forceOnTop']) {
|
||
if ($properties['section'] === self::PART_HEADER) {
|
||
$jsFiles = $tag . chr(10) . $jsFiles;
|