Project

General

Profile

Bug #20366 ยป 10994.diff

Administrator Admin, 2009-04-27 17:24

View differences:

typo3/template.php (working copy)
'slider' => false
);
protected $addExtJS = false;
protected $addExtJSdebug = false;
protected $extJSadapter = 'ext/ext-base.js';
protected $enableExtJsDebug = false;
/**
......
// include extJS
if ($this->addExtJS) {
// use the base adapter all the time
$libs[] = 'contrib/extjs/adapter/ext/ext-base.js';
$libs[] = 'contrib/extjs/ext-all' . ($this->addExtJSdebug ? '-debug' : '') . '.js';
$libs[] = 'contrib/extjs/adapter/' . $this->extJSadapter;
$libs[] = 'contrib/extjs/ext-all' . ($this->enableExtJsDebug ? '-debug' : '') . '.js';
// add extJS localization
$localeMap = $GLOBAL['LANG']->csConvObj->isoArray; // load standard ISO mapping and modify for use with ExtJS
......
* call this function if you need the extJS library
* @param boolean $css flag, if set the ext-css will be loaded
* @param boolean $theme flag, if set the ext-theme "grey" will be loaded
* @param string $adapter choose alternative adapter, possible values: yui, prototype, jquery
*/
public function loadExtJS($css = true, $theme = true) {
public function loadExtJS($css = true, $theme = true, $adapter = '') {
if ($adapter) {
switch (t3lib_div::strtolower(trim($adapter))) {
case 'yui':
$this->extJSadapter = 'yui/ext-yui-adapter.js';
break;
case 'prototype':
$this->extJSadapter = 'prototype/ext-prototype-adapter.js';
break;
case 'jquery':
$this->extJSadapter = 'jquery/ext-jquery-adapter.js';
break;
}
}
if (!$this->addExtJS) {
$this->addExtJS = true;
if ($css) {
......
/**
* call this function to load debug version of extJS. Use this for development only
*/
public function setExtJSdebug() {
$this->addExtJSdebug = true;
public function enableExtJsDebug() {
$this->enableExtJsDebug = true;
}
    (1-1/1)