[TYPO3-project-4-3] Inline JS in Backend

Steffen Kamper info at sk-typo3.de
Fri Feb 6 23:46:30 CET 2009


Hi,

the situation with all the inline JS is really suboptimal. There are a 
lot of functions only for comatibility reasons, fixing JS bugs is very 
difficult, snippets are spreaded to many core files.

So i have an idea which one i would like to discuss.

What i suggest is a transparent solution:

* move inline scripts to external files
* use 2 objects for inline:

TYPO3Backend.constants = {
   var1 = xyz;
};

TYPO3Backend.lang = {
    label1 = xyz;
}

These two obkjcts are easy to use inline in php without a big risk to 
create new bugs.

The external files are easy to maintain, better to see what we have etc.
Old functions could be changed with new method or calling new functions.
Functions can be grouped by functionality like it is done in php classes.
You get a better overview what is used, what can be reused etc.


What do you think?

vg Steffen


More information about the TYPO3-project-4-3 mailing list