0009608.patch

Administrator Admin, 2008-10-21 10:52

Download (2.9 KB)

View differences:

t3lib/class.t3lib_tceforms.php (Arbeitskopie)
5076 5076

  
5077 5077
		if (!$update) {
5078 5078
			if ($this->loadMD5_JS) {
5079
				$GLOBALS['SOBE']->doc->loadJavascriptLib('md5.js');
5079
				$this->loadJavascriptLib('md5.js');
5080 5080
			}
5081 5081

  
5082
			$GLOBALS['SOBE']->doc->loadJavascriptLib('contrib/prototype/prototype.js');
5083
			$GLOBALS['SOBE']->doc->loadJavascriptLib('../t3lib/jsfunc.evalfield.js');
5082
			$this->loadJavascriptLib('contrib/prototype/prototype.js');
5083
			$this->loadJavascriptLib('../t3lib/jsfunc.evalfield.js');
5084 5084
			// @TODO: Change to loadJavascriptLib(), but fix "TS = new typoScript()" issue first - see bug #9494
5085 5085
			$jsFile[] = '<script type="text/javascript" src="'.$this->backPath.'jsfunc.tbe_editor.js"></script>';
5086 5086

  
5087 5087
				// if IRRE fields were processed, add the JavaScript functions:
5088 5088
			if ($this->inline->inlineCount) {
5089
				$GLOBALS['SOBE']->doc->loadJavascriptLib('contrib/scriptaculous/scriptaculous.js');
5090
				$GLOBALS['SOBE']->doc->loadJavascriptLib('../t3lib/jsfunc.inline.js');
5089
				$this->loadJavascriptLib('contrib/scriptaculous/scriptaculous.js');
5090
				$this->loadJavascriptLib('../t3lib/jsfunc.inline.js');
5091 5091
				$out .= '
5092 5092
				inline.setPrependFormFieldNames("'.$this->inline->prependNaming.'");
5093 5093
				inline.setNoTitleString("'.addslashes(t3lib_BEfunc::getNoRecordTitle(true)).'");
......
5487 5487
		return $out;
5488 5488
	}
5489 5489

  
5490
 	/**
5491
	 * Includes a javascript library that exists in the core /typo3/ directory. The
5492
	 * backpath is automatically applied.
5493
	 * This method acts as wrapper for $GLOBALS['SOBE']->doc->loadJavascriptLib($lib).
5494
	 *
5495
	 * @param	string		$lib: Library name. Call it with the full path like "contrib/prototype/prototype.js" to load it
5496
	 * @return	void
5497
	 */
5498
	public function loadJavascriptLib($lib) {
5499
		$GLOBALS['SOBE']->doc->loadJavascriptLib($lib);
5500
	}
5490 5501

  
5491 5502

  
5492 5503

  
......
5515 5526

  
5516 5527

  
5517 5528

  
5529

  
5518 5530
	/********************************************
5519 5531
	 *
5520 5532
	 * Various helper functions
......
6081 6093
		<td nowrap="nowrap" bgcolor="#F6F2E6"><font face="verdana" size="1" color="black"><b>###FIELD_HEADER###</b></font></td>
6082 6094
	</tr>	';
6083 6095
	}
6096

  
6097
 	/**
6098
	 * Includes a javascript library that exists in the core /typo3/ directory. The
6099
	 * backpath is automatically applied.
6100
	 * This method adds the library to $GLOBALS['TSFE']->additionalHeaderData[$lib].
6101
	 *
6102
	 * @param	string		$lib: Library name. Call it with the full path like "contrib/prototype/prototype.js" to load it
6103
	 * @return	void
6104
	 */
6105
	public function loadJavascriptLib($lib) {
6106
		if (!isset($GLOBALS['TSFE']->additionalHeaderData[$lib])) {
6107
			$GLOBALS['TSFE']->additionalHeaderData[$lib] = '<script type="text/javascript" src="' . $this->backPath . $lib . '"></script>';
6108
		}
6109
	}
6084 6110
}
6085 6111

  
6086 6112
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_tceforms.php'])	{