[TYPO3-core] RFC: #10122: loadJavascriptLib needs second param to be unique
Franz Koch
typo.removeformessage at fx-graefix.de
Wed Jan 14 11:04:14 CET 2009
Hi,
>> If both are official supported, then I would create special loader
>> methods for them which resolve dependencies and take care of the right
>> order of inclusion etc.
>>
>> $this->doc->loadExtJS('moduleName');
>
> Steffen has already suggested such a function. But it turned out that
> there are some intricacies.
>
> So to ensure correct load order I suggest three functions:
>
> loadPrototype()
> loadScriptaculous($module)
> loadExtJS($theme='',$debug=false)
>
> They may be called in any order repeatedly. The page rendering code will
> make sure they are loaded in the correct order and extJS will be called
> with the proper adapter.
>
> If loadScriptaculous() may be called with different modules all of them
> will be loaded.
>
> extJS will always be loaded with the proper CSS. Actually I see no
> reason to load it without.
That was also what I was thinking of - loader methods for every official
supported JS library that take care of everything (order, dependencies,
multiple calls,...) - just like you suggested.
As I mentioned - I think there is a extension in TER that is doing
exactly this for FE, even with support for different versions of a JS
library.
--
kind regards,
Franz Koch
More information about the TYPO3-team-core
mailing list