[TYPO3-core] RFC: Refactored clickmenu to speed up the BE
Benjamin Mack
mack at xnos.org
Fri Nov 9 21:58:57 CET 2007
Commited to trunk (rev #2682).
Thanks for all your testing, both team and external. I'm glad this patch
finally went through (I initially made it in March :)).
If something comes up during the next alphas and betas about the
changes, just let me know.
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
More information about the TYPO3-team-core
mailing list