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

Benjamin Mack mack at xnos.org
Mon Sep 10 19:52:13 CEST 2007


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.

-- 
greetings,
benni.
-SDG-

www.xnos.de // www.xnos.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20070908_clickmenu.zip
Type: application/zip
Size: 6601 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20070910/2c64936c/attachment.zip 


More information about the TYPO3-team-core mailing list