Bug #19813 ยป 10122.diff
typo3/template.php (working copy) | ||
---|---|---|
* Includes a javascript library that exists in the core /typo3/ directory. The
|
||
* backpath is automatically applied
|
||
*
|
||
* @param string $lib: Library name. Call it with the full path
|
||
* like "contrib/prototype/prototype.js" to load it
|
||
* @param string $lib: Library. Call it with the full path
|
||
* @param string $name: Library name. Use unique name for identify
|
||
* like loadJavascriptLib("contrib/prototype/prototype.js", "prototype") to load it
|
||
* @return void
|
||
*/
|
||
function loadJavascriptLib($lib) {
|
||
if (!isset($this->JScodeLibArray[$lib])) {
|
||
$this->JScodeLibArray[$lib] = '<script type="text/javascript" src="'.$this->backPath.$lib.'"></script>';
|
||
function loadJavascriptLib($lib, $name='') {
|
||
if (!$name) {
|
||
$name = $lib;
|
||
}
|
||
if (!isset($this->JScodeLibArray[$name])) {
|
||
$this->JScodeLibArray[$lib] = '<!-- include JavascriptLib: ' . htmlspecialchars($name) . ' -->
|
||
<script type="text/javascript" src="' . $this->backPath . $lib . '"></script>';
|
||
}
|
||
}
|
||