[TYPO3-dev] Coordinating usage of prototype and Co.

Ries van Twisk typo3 at rvt.dds.nl
Thu Apr 12 19:54:53 CEST 2007


I would suggest make an (sys) extension
that creates a single point of entry for prototype related activity.

I 100% agree with the 'key' which is lowercase already and not even a  
constant
so it's dangerous to use.

This is what I do for dojo, and extension I made a couple of months ago:

			$GLOBALS['RVT_DOJO'] -> dojoRequire('dojo.widget.Editor2');
			$GLOBALS['RVT_DOJO'] -> dojoRequire 
('dojo.widget.DropdownDatePicker');
			$GLOBALS['RVT_DOJO'] -> dojoRequire('dojo.widget.RegexpTextbox');
			$GLOBALS['RVT_DOJO'] -> dojoRequire('dojo.widget.Button');

I know, it uses a ugly GLOBAL but the idea is simple.
Single point of entry,
any extension that requires dojo.widget.Button calls

	$GLOBALS['RVT_DOJO'] -> dojoRequire('dojo.widget.Button');

Then when the page get's created a function get's called that renders
all JS needed for dojo and only one instance of dojo.widget.Button  
get's added to the page.

Something like that could be added for prototype aswell:

Ries
PS: dojo.js get's always added by default....


> Hu I see,
>
> So the key to the problem is the key in the header array ;)
> Thank you for your quick answer !!
>
> But this method looks a little uncertain to me, as you have to know  
> the
> key associated to the lib you want to insert ( and we all know that
> developpers rarely care about being standard :D )
>
> and what about using the home url of the library as a key ?
> Well it still looks weak :(
>
>
> I can't believe that such a simple thing can be such a big problem
> because of a lack of coordination :(
>
> Benjamin, you seem to be in touch with the core team on this point,
> what's their plan about this ?
>
> Jerome Schneider
>
>
>
>
>
> Benjamin Mack a écrit :
>> Hey jerome,
>>
>> it's a tricky question. As of 4.1, prototype and scripaculous is  
>> already
>> included in the TYPO3 core source.
>>
>> The problem still is that there is no real solution yet on how to  
>> find
>> out if prototype is loaded.
>>
>> See: http://bugs.typo3.org/view.php?id=4860
>>
>> Also, I don't think there is a way yet to find out which prototype
>> version is loaded and how to set requirements.
>>
>>
>> greetings,
>> benni.
>> -SDG-
>>
>> www.xnos.de // www.xnos.org
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev









More information about the TYPO3-dev mailing list