Project

General

Profile

Bug #19423 » 0009497_4-2.patch

Administrator Admin, 2008-10-08 11:18

View differences:

t3lib/class.t3lib_tceforms.php (Arbeitskopie)
* @return string A section with JavaScript - if $update is false, embedded in <script></script>
*/
function JSbottom($formname='forms[0]', $update = false) {
$jsFile = array();
$elements = array();
// required:
......
if (!$update) {
if ($this->loadMD5_JS) {
$GLOBALS['TBE_TEMPLATE']->loadJavascriptLib('md5.js');
$GLOBALS['SOBE']->doc->loadJavascriptLib('md5.js');
}
$GLOBALS['TBE_TEMPLATE']->loadJavascriptLib('contrib/prototype/prototype.js');
$GLOBALS['TBE_TEMPLATE']->loadJavascriptLib('../t3lib/jsfunc.evalfield.js');
$GLOBALS['TBE_TEMPLATE']->loadJavascriptLib('jsfunc.tbe_editor.js');
$GLOBALS['SOBE']->doc->loadJavascriptLib('contrib/prototype/prototype.js');
$GLOBALS['SOBE']->doc->loadJavascriptLib('../t3lib/jsfunc.evalfield.js');
// @TODO: Change to loadJavascriptLib(), but fix "TS = new typoScript()" issue first - see bug #9494
$jsFile[] = '<script type="text/javascript" src="'.$this->backPath.'jsfunc.tbe_editor.js"></script>';
// if IRRE fields were processed, add the JavaScript functions:
if ($this->inline->inlineCount) {
$GLOBALS['TBE_TEMPLATE']->loadJavascriptLib('contrib/scriptaculous/scriptaculous.js');
$GLOBALS['TBE_TEMPLATE']->loadJavascriptLib('../t3lib/jsfunc.inline.js');
$GLOBALS['SOBE']->doc->loadJavascriptLib('contrib/scriptaculous/scriptaculous.js');
$GLOBALS['SOBE']->doc->loadJavascriptLib('../t3lib/jsfunc.inline.js');
$out .= '
inline.setPrependFormFieldNames("'.$this->inline->prependNaming.'");
inline.setNoTitleString("'.addslashes(t3lib_BEfunc::getNoRecordTitle(true)).'");
......
// Regular direct output:
if (!$update) {
$out = chr(10) . chr(9) . t3lib_div::wrapJS($out);
$spacer = chr(10) . chr(9);
$out = $spacer . implode($spacer, $jsFile) . t3lib_div::wrapJS($out);
}
return $out;
typo3/alt_palette.php (Arbeitskopie)
function main() {
$this->content='';
$this->content.=$this->doc->startPage('TYPO3 Edit Palette');
$inData = explode(':',$this->inData);
......
// Add all the content, including JavaScript as needed.
$this->content.=$tceforms->printNeededJSFunctions_top().$formContent.$tceforms->printNeededJSFunctions();
}
// Assemble the page:
$tempContent = $this->content;
$this->content = $this->doc->startPage('TYPO3 Edit Palette');
$this->content.= $tempContent;
}
/**
typo3/wizard_rte.php (Arbeitskopie)
'.($this->popView ? t3lib_BEfunc::viewOnClick($rawRec['pid'],'',t3lib_BEfunc::BEgetRootLine($rawRec['pid'])) : '').'
');
// Create page HTML header:
$this->content.=$this->doc->startPage('');
// Initialize TCeforms - for rendering the field:
$tceforms = t3lib_div::makeInstance('t3lib_TCEforms');
$tceforms->initDefaultBEMode(); // Init...
......
$tceforms->printNeededJSFunctions();
} else {
// ERROR:
$this->content.=$this->doc->startPage('');
$this->content.=$this->doc->section($LANG->getLL('forms_title'),'<span class="typo3-red">'.$LANG->getLL('table_noData',1).'</span>',0,1);
}
// Assemble the page:
$tempContent = $this->content;
$this->content = $this->doc->startPage('');
$this->content.= $tempContent;
}
/**
(4-4/4)