[TYPO3-core] RFC: #13980: PageRenderer renderJsLibraries should be after the hook

Steffen Kamper info at sk-typo3.de
Wed Mar 31 18:24:58 CEST 2010


Hi,

This is an SVN patch request.

Type: Bugfix
Bugtracker references: http://bugs.typo3.org/view.php?id=13980

Branches:
TYPO3_4-3 & trunk

Problem:
If you want to manipulate ExtOnReady code or the js libs, the hook is 
too late.

Easy to solve, move the call $this->renderJsLibraries() behind the hook.

Just to show before/after

before in hook:

$parameters['jsLibsCore'] = str_replace('TYPO3.Backend = new 
TYPO3.Viewport(TYPO3.Viewport.configura
tion);',
     'Ext.apply(TYPO3.Viewport.configuration.items[1], {
         split: true,
         collapsable: true,
         collapseMode: \'mini\',
         hideCollapseTool: true,
         animCollapse: false
     });
TYPO3.Backend = new TYPO3.Viewport(TYPO3.Viewport.configuration);',
$parameters['jsLibsCore']);



and after:

$pageRenderer->addExtOnReadyCode("
     Ext.apply(TYPO3.Viewport.configuration.items[1], {
         split: true,
         collapsable: true,
         collapseMode: 'mini',
         hideCollapseTool: true,
         animCollapse: false
     });
", TRUE);


which is definitive the cleaner solution

vg Steffen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 13980.diff
Type: text/x-diff
Size: 880 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100331/88617d24/attachment.diff>


More information about the TYPO3-team-core mailing list