[TYPO3-core] Tabbed menus as a separate class file

Steffen Kamper steffen at sk-typo3.de
Sun Nov 18 19:13:13 CET 2007


"Martin Kutschker" <martin.kutschker-n0spam at no5pam-blackbox.net> schrieb im 
Newsbeitrag 
news:mailman.1.1195408741.2599.typo3-team-core at lists.netfielders.de...
> Tapio Markula schrieb:
>> Martin Kutschker
>>>
>>> Though we could for BE only scripts use script loader code in files at 
>>> the current position and move the real code into t3lib/js.
>>>
>>> The restriction to BE is because BE requires new Javascript and FE may 
>>> work on older browser.
>> IE 6.0, FF 1.x and some orhter as old browsers is enough
>>
>> I don't renamed function names but renamed js-file - that is intended now 
>> to put own folder.
>
> Sorry I was unclear here. I meant that in FE the JS code has to work with 
> older browser tat don't support loading of JS file via JS. I did not talk 
> about renaming of functions.
>
> My idea was to turn all current t3lib/xxx.js files into stubs and move 
> them into t3lib/js/. Works like this (for backwards compatibility):
>
> function myloaderfunction() {
>  var el = document.createElement("script");
>  el.src = "typo3/js/xxx.js";
>  el.type = "text/javascript";
>  document.getElementsByTagName("head")[0].appendChild(el);
> }
>
> if (window.addEventListener) {
>  window.addEventListener('load', myloaderfunction, false);
> } else if (window.attachEvent){
>   window.attachEvent("onload", myloaderfunction);
> } else {
>   // ouch! won't work on old browsers incl. IE on Mac
> }
>
> In 4.3 we can remove the stubs because we announce it explicitly that we 
> are about to move some files.
>
> Problem: the files ar now loaded after the body has loaded. So anyone 
> including the stubs via the HTML script tag may be surprised that the 
> file's content isn't available instantly as it might be expected.
>
> Masi
>
>

but if loaded from JS, they need to go through eval, or not?

vg  Steffen 




More information about the TYPO3-team-core mailing list