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

Martin Kutschker masi-no at spam-typo3.org
Mon Jan 12 10:38:28 CET 2009


Steffen Kamper schrieb:

> 
>> 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.

How come?

> First call without
> adapter, second with adapter will only add the adapter.

The the adapter will be loaded AFTER the main code, which must not
happen. BTW, I doubt that you can use more then one adapter at the same
time, but I didn't check the extJS docs.

>> 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?

I'm just about to write some code for a custom TCA field that needs to
load extJS. Now what happens if another extensions adds another custom
field to the same table but loads extJS differently.

Even in the BE it is not guaranteed that any given resource is loaded
only once. There are hooks all over the place, so any BE code developer
must be aware of other extensions that might load resources.


> 
> 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.

I found minified files in the build directory of extJS.

> 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.

I didn't check, I only found it in the extensions doc :)

Masi


More information about the TYPO3-team-core mailing list