[TYPO3-core] RFC: Bug 0011805 IRRE does not work correctly with FE-editing
Bjoern Pedersen
pedersen at resi2.office.frm2
Mon Jan 11 11:05:38 CET 2010
Bjoern Pedersen <pedersen at resi2.office.frm2> writes:
> Problem:
> The ajax-calls for editing inline records miss the path to the typo3/
> backend directory if in FE-editing mode.
>
> Solution:
> amend the jsfunc.inline.js with the correct backend path
> via a setter function called in class.t3lib_tceforms.php
>
> patch is against typo4.3.0.
>
> diff -ru /home/pedersen/typo3_src-4.3.0/t3lib/class.t3lib_tceforms.php /home/webmaster/frm2/typo3_src/t3lib/class.t3lib_tceforms.php
> --- /home/pedersen/typo3_src-4.3.0/t3lib/class.t3lib_tceforms.php 2009-11-30 10:29:44.000000000 +0100
> +++ /home/webmaster/frm2/typo3_src/t3lib/class.t3lib_tceforms.php 2009-12-08 09:03:44.000000000 +0100
> @@ -5322,6 +5322,9 @@
> if ($this->inline->inlineCount) {
> $GLOBALS['SOBE']->doc->getPageRenderer()->loadScriptaculous();
> $this->loadJavascriptLib('../t3lib/jsfunc.inline.js');
> + if (TYPO3_MODE=='FE') {
> + $out.= 'inline.setTypo3Path("'.TYPO3_mainDir.'")';
> + }
> $out .= '
> inline.setPrependFormFieldNames("'.$this->inline->prependNaming.'");
> inline.setNoTitleString("'.addslashes(t3lib_BEfunc::getNoRecordTitle(true)).'");
> diff -ru /home/pedersen/typo3_src-4.3.0/t3lib/jsfunc.inline.js /home/webmaster/frm2/typo3_src/t3lib/jsfunc.inline.js
> --- /home/pedersen/typo3_src-4.3.0/t3lib/jsfunc.inline.js 2009-11-30 10:29:45.000000000 +0100
> +++ /home/webmaster/frm2/typo3_src/t3lib/jsfunc.inline.js 2009-12-08 08:51:46.000000000 +0100
> @@ -32,6 +32,7 @@
> var inline = {
> structureSeparator: '-',
> prependFormFieldNames: 'data',
> + typo3Path: '',
> noTitleString: '[No title]',
> lockedAjaxMethod: {},
> sourcesLoaded: {},
> @@ -43,6 +44,7 @@
> });
> },
> setPrependFormFieldNames: function(value) { this.prependFormFieldNames = value; },
> + setTypo3Path: function(value) { this.typo3Path = value; },
> setNoTitleString: function(value) { this.noTitleString = value; },
>
> expandCollapseRecord: function(objectId, expandSingle) {
> @@ -129,7 +131,7 @@
> makeAjaxCall: function(method, params, lock) {
> var max, url='', urlParams='', options={};
> if (method && params && params.length && this.lockAjaxMethod(method, lock)) {
> - url = 'ajax.php';
> + url = this.typo3Path+'ajax.php';
> urlParams = '&ajaxID=t3lib_TCEforms_inline::'+method;
> for (var i=0, max=params.length; i<max; i++) {
> urlParams += '&ajax['+i+']='+params[i];
>
>
> --
> Bjoern Pedersen Lichtenbergstr.1
> Technische Universitaet Muenchen D-85747 Garching
> Forschungsneutronenquelle Heinz Maier-Leibnitz (FRM II)
Reminder #3
More information about the TYPO3-team-core
mailing list