[TYPO3-core] RFC #15800: Cleanup CSH Code
Steffen Kamper
info at sk-typo3.de
Mon Oct 11 11:17:35 CEST 2010
Hi Benni,
Benjamin Mack schrieb:
> Hey,
>
> On 10.10.10 22:21, Steffen Kamper wrote:
>> instead of DOM query i think the direct call in onclick is more
>> performant here.
> Well, the point of the cleanup was to get rid of the onclick="" handler
> which I wanted to avoid in general. The reason for this is that there is
> more to come for the CSH stuff, and I didn't want to duplicate this long
> "onclick" line all the time (which, with 300 help icons, is indeed quite
> some code... :)".
>
the information is in anyways, in rel or onclick. My reason is that Dom
query takes a long time, so onclick is just faster.
> The reason for that patch (which is flying around on my desktop for
> quite some time now) was that I could move forward with getting rid of
> the help icon in general and put the "logic" code somewhere else
> (showing help when hovering over the title of a TCEforms element :)),
> without the onclick just by providing the semantic information to that
> element.
>
ok, you should mention such reasons ;) My intention was in general
1) having the help global (not in template)
2) don't add more js logic in php, it's hard to maintain
> So, in terms of what I wanted to achieve with it, your patch actually
> takes the one line onclick="", replaces the onclick="" with something
> else and creates 80 more lines within notification.js, so I don't see a
> huge benefit in what my initial goal was. -1 on that, sorry.
>
> So: What do we do now?
>
I still think that the code in notification is the better solution.
Instead of DOMQuery i would prefer a general clickhandler. Just use an
"a" tag with the help class. This would allow to react on different
links and don't need the query. The clickhandler could be integrated in
iframepanel as general listener.
>> ps - old and new behaviour is to use the same window for all help
>> request. Is this the intention? That prevent open more than one of these
>> windows.
> Well, I didn't change that behaviour.
>
this is a general question, as i think each help window should be
unique, better to use the identifier, so you can open more than one help
window if needed.
vg Steffen
More information about the TYPO3-team-core
mailing list