Bug #19773 » 10069.diff
typo3/template.php (working copy) | ||
---|---|---|
}
|
||
}
|
||
/**
|
||
* Includes extJS library
|
||
*
|
||
* @param string adapters as commalist, possible values are prototype/ext
|
||
* @param boolean if set, ext-all.css will be added to head section
|
||
* @param boolean if set, xtheme-gray.css will be added to head section
|
||
*
|
||
* @return void
|
||
*/
|
||
|
||
function loadExtJS($adapters = '', $includeCSS = true, $includeTheme = 'grey') {
|
||
// load extJS-library
|
||
$this->loadJavascriptLib('contrib/extjs/ext-all.js');
|
||
if ($adapters) {
|
||
$adapter = t3lib_div::trimExplode(',', $adapters, true);
|
||
if (count($adapter)) {
|
||
foreach($adapter as $lib) {
|
||
switch ($lib) {
|
||
case 'prototype':
|
||
$this->loadJavascriptLib('contrib/extjs/adapter/prototype/ext-prototype-adapter.js');
|
||
break;
|
||
case 'ext':
|
||
$this->loadJavascriptLib('contrib/extjs/adapter/ext/ext-base.js');
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
// set clear.gif
|
||
$this->JScodeArray[] = 'Ext.BLANK_IMAGE_URL = "' . htmlspecialchars(t3lib_div::locationHeaderUrl('gfx/clear.gif')) . '";';
|
||
|
||
// include CSS
|
||
if ($includeCSS) {
|
||
$this->addStyleSheet('extJS','contrib/extjs/resources/css/ext-all.css', 'ext-all');
|
||
}
|
||
if ($includeTheme) {
|
||
$this->addStyleSheet('extJS-gray', 'contrib/extjs/resources/css/xtheme-gray.css');
|
||
}
|
||
|
||
}
|
||
|
||
/**
|
||
* Includes the necessary Javascript function for the clickmenu (context sensitive menus) in the document
|
||
*
|
||
* @return array Deprecated: Includes the code already in the doc, so the return array is always empty.
|