[TYPO3-core] RFC: Refactored clickmenu to speed up the BE

Benjamin Mack mack at xnos.org
Tue Oct 30 09:40:36 CET 2007


Hey all,

sorry, one file was missing in the last patch, the attached patch should 
take care of it. I tried out the just created patch. If you have strange 
behaviour where the clickmenu will show up, please clear your browser cache.

Sorry, Dmitry and Jeff!

greetings,
benni.
-SDG-

www.xnos.de // www.xnos.org


Benjamin Mack wrote:
> Hey guys,
> 
> ok. here's my new version for the clickmenu patch!
> 
> * Fixed almost all of Ingos recommendations (except the "put the second 
> layer 5 pixel below)")
> * Created the patch against the latest trunk (sorry Dmitry for the first 
> time)
> * Tested in IE 5.5,6,7, FF2 (linux), Opera and Konqueror
> * Some additional changes for alt_clickmenu.php and for all uses in the 
> backend, since the getContextMenuCode() function from template.php does 
> not need to return anything anymore.
> 
> The last addition makes it quite a lot to change but it's all trivial 
> and makes the Core code more readable IMHO.
> 
> Enjoy and thanks for reviewing.
> 
> -- 
> greetings,
> benni.
> -SDG-
> 
> www.xnos.de // www.xnos.org
> 
> 
> Benjamin Mack wrote:
>> Hey devs,
>>
>> This is a SVN patch request.
>> Type: Feature
>> Branches: trunk
>> Description: I refacted the Clickmenu, or let's say: The server calls 
>> to display the clickmenu. It only speeds up the BE, but does not add 
>> something new in the user interface.
>>
>> Why should we need that?
>> * The old code was all inline JS in template.php. Thus it get's 
>> included and loaded in every instance of the Backend (tree, every 
>> content frame call). Well, if we outsource it in an extra JS file, it 
>> get's loaded only once a session. This means the browser needs to 
>> download 8.3 KB less every request! We also separate the JS code from 
>> the PHP code.
>> * The old code used it's own XMLHTTPRequest... why not just take 
>> prototype?
>> * No crypted names anymore (GLV_...) ;-)
>>
>> What's so nice about it?
>> * I included most of the old functions (marked as deprecated) to keep 
>> up compatibility.
>> * It's tested in IE 6, IE 7, FF 2 and Konqueror.
>>
>> So, I have two files in the ZIP file.
>>
>> == clickmenu.js ==
>> Includes the refactored clickmenu. Has to be copied in /typo3/js/. You 
>> probably need to create this directory in your test environment.
>>
>> == clickmenu.patch ==
>> Changes 3 files:
>>
>> * typo3/stylesheet.css
>> adds styles for the clickmenu containers. Was done via inlineCSS before.
>>
>> * typo3/tree.js
>> the drag&drop code used the clickmenu code before to e.g. calculate 
>> the mouse position.
>> This is now done via prototype.
>>
>> * typo3/template.php
>> Almost all of the inline-javascript code dropped out. Only a couple of 
>> lines of some
>> runtime configuration is done here.
>>
>> The JS style is similar to the tree.js, most of the changes are done 
>> in JS, almost none
>> of the PHP code was touched.
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> TYPO3-team-core mailing list
>> TYPO3-team-core at lists.netfielders.de
>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-core
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Before posting to this list, please have a look to the posting rules
> on the following websites:
> 
> http://typo3.org/teams/core/core-mailinglist-rules/
> http://typo3.org/development/bug-fixing/diff-and-patch/ 
> _______________________________________________
> TYPO3-team-core mailing list
> TYPO3-team-core at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-core
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20071030_clickmenu.patch
Type: text/x-patch
Size: 34914 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20071030/819c425a/attachment-0001.bin 


More information about the TYPO3-team-core mailing list