[TYPO3-core] RFC: #10069: Feature: Function for including extJS in Backend module

Steffen Kamper info at sk-typo3.de
Mon Jan 12 10:22:12 CET 2009


Hi Masi,

Martin Kutschker schrieb:
> Steffen Kamper schrieb:
>> Hi,
>>
>> here is an updated version.
>> i added
>> * @param debug (if set, ext-all-debug.js will be included instead of
>> ext-all.js)
>> * CSS possible override with $TBE_STYLES (possible for ext-all.css and
>> theme css)
> 
> I found in TER the "extjs" extensions which also offers the option to
> switch between compressed and uncompressed scripts and an option to
> define the language.
> 
> Does it ake sense to rename these options?
> 
> $GLOBALS['TBE_STYLES']['extJS']['ext-all'] => 'CSS'
> $GLOBALS['TBE_STYLES']['extJS']['ext-theme'] => 'theme'
>
> The reason is that the "ext-" prefix is not needed and the files might
> change in future versions of extJS (and therefore making no sense).
>
no problem. I guess the keywords all/theme should be in.

> BTW, what happens if two scripts call this function with different
> options? I think that extJS will be included twice as the JS/CSS loader
> APIs will treat the included files as different.
> 

In genereal a second call only adds the missing part. First call without 
adapter, second with adapter will only add the adapter.

> Possible clashes with a second call:
> 
> * Changed adapter
> 
> this should throw an exception
>
there is imho no reason for. Remember that this is used for modules, who 
should call it a second time? Only wrong code of dev can cause this. It 
would be different if it's for FE.


> * Changed debug
> 
> Load debug version
> 
> * Changed CSS:
> 
> Load CSS
> 
> * Changed theme
> 
> Load theme set in first call
> 
> * CHanged compressing
> 
> Load uncompressed files
> 
> * Change language
> 
> Load language set in first call
> 
> Masi

At the moment we don't have the compressed version. I know from own 
expieriences that it's not easy to compress extJS - the minifier won't work.
Language will not be loaded, it's set in Code. ExtJS takes care of 
loading the language, it's done with something like this:
Ext.urlEncode({"lang":language,"charset":charset});

Maybe a good idea to include this beside the cleargif.

vg Steffen


More information about the TYPO3-team-core mailing list