[TYPO3-core] RFC #15800: Cleanup CSH Code

Helmut Hummel helmut at typo3.org
Fri Sep 24 21:32:58 CEST 2010


Hi Benni,

On 24.09.10 19:59, Benjamin Mack wrote:
> 
> 
> If you have a lot of CSH icons on your page (e.g. TCEforms) this code
> gets repeated over and over again. I suggest to move the onclick code
> into a JS function that checks for all anchors with the class"
> typo3-csh-link" and then opens up the window. This ways we only have
> anchors like this:
> 
> <a class="typo3-csh-link" href="" rel="pages|hidden">
> 
> This also will decrease the page load of huge TCEform pages.

Good one!

+1 by testing. A few remarks by reading though.

Is there a reason why you use a pipe ("|") as separator of table and
field and use split() in the JS code to then concatenate the two strings
with '.' Why not use a dot straight ahead (see attached patch).

If the href attribute is not needed, why adding it with an emty value.
AFAIK it is not mandatory to have a href attribute in a link tag.

Last thing: are there CGLs for JavaScript? Is there a reason you use
abbreviated variable names like "el" or "anchorEl" or "evt"?

Regards Helmut
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 15800_v2.patch
Type: text/x-patch
Size: 4001 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100924/03173167/attachment.bin>


More information about the TYPO3-team-core mailing list