[TYPO3-core] RFC: #6995 Context Senstitive Help text should be displayed faster

Christoph Lindenmueller christoph at xnos.de
Sun Jan 6 13:59:39 CET 2008


Hi Ernesto & Dmitry,

here is the patch with the tooltip as SPAN for xhtml compliance as 
Ernesto wrote.

* I removed the API changes.
* For the TCE Forms the tooltip text comes from t3lib_BEfunc::helpText();
* The current issue is better positioning if the HelpIcon is near a 
Window border in IE7, see attached screen top right.

Greetings,

Chris.

Ernesto Baschny [cron IT] schrieb:
> Hi Christoph,
> 
> thanks for the nice follow-up and your detailed work on our comments!
> 
> I just noticed a "new" XHTML conformity problem with the presented
> solution, which I wasn't aware when I suggested changing the SPAN with a
> DIV. We will always need to nest some block elements inside a <A> tag.
> So no matter how we turn it, we will end up with either:
> 
> a) A>DIV>P   or
> b) A>SPAN>P
> 
> In a) the illegal part is A>DIV. In b) the SPAN>P is illegal. While this
> is just a validation issue, I think it is important that we ship valid
> XHTML in new code we produce.
> 
> Since we need the :hover to apply to sub-elements, the only solution I
> see here is to create something like:
> 
> 1) A>SPAN.typo3-csh-inline>SPAN.header   (instead of H4)
> 2) A>SPAN.typo3-csh-inline>SPAN.paragraph  (instead of P)
> 
> meaning we have to render the CSH differently for this purpose. I think
> this can be done in function helpText (e.g. new parameter "$inlineTags =
> false").
> 
> Apart from that, the CSS needs a bit "cleanup". You currently have:
> 
> A.typo3-csh-link { white-space: normal; }
> A.typo3-csh-link div, A.typo3-csh-link a.typo3-csh-more { display: none; }
> A.typo3-csh-link:hover div, A.typo3-csh-link:hover span a { display:
> block; }
> A.typo3-csh-link:hover div { position: absolute; margin: 0px 0 0 17px;
> background: #ffffff; border: 1px solid #555; width: 200px; z-index: 100; }
> A.typo3-csh-link:hover h4, A.typo3-csh-link:hover p { margin-top: 0;
> padding: 2px 5px; }
> A.typo3-csh-link:hover p { font-weight: normal; }
> 
> My suggestion:
> 
> A.typo3-csh-link { white-space: normal; }
> A.typo3-csh-link DIV.typo3-csh-inline { display: none; }
> A.typo3-csh-link:hover DIV.typo3-csh-inline { display: block; }
> A.typo3-csh-link DIV.typo3-csh-inline { position: absolute; margin: 0px
> 0 0 17px; background: #ffffff; border: 1px solid #555; width: 200px;
> z-index: 100; }
> A.typo3-csh-link DIV.typo3-csh-inline H4, A.typo3-csh-link
> DIV.typo3-csh-inline P { margin-top: 0; padding: 2px 5px; }
> 
> Meaning:
> - tags in UPPER case
> - remove obsolete or unused stuff (.typo3-csh-more? span a?)
> - let the browser render everything in the DIV correctly from start and
> only switch the display:hidden to block on the :hover event).
> 
> Remark: This doesn't work on IE6, but I guess this is not really that
> important as it is only a cosmetical new feature.
> 
> Cheers,
> *Ernesto
> 
> 
> Christoph Lindenmueller wrote: on 28.12.2007 02:31:
>> Hey Guys,
>>
>> this is a new patch fixing the problems I got from the List feedback,
>> thanks for your tips. Kept CSS only solution for now.
>>
>> Changes to previous Version:
>>
>> [Steffen Kamper]
>>> when i move over help in left frame, frame is resized to double
>> Could not reproduce this. But OK if the new backend.php is on.
>>
>> [Dimitry]
>> * "see also" arrow displayed now
>> * API & functionality unchanged $force=0 in
>> function helpTextIcon($table,$field,$BACK_PATH,$force=0)   
>>
>> [Ernesto Baschny]
>> * <span> is now a <div>
>> * forceCharSet utf-8 ok
>> * no tooltip if edit_showFieldHelp to "text"
>>
>>
>> Tested Browsers:
>> Ubuntu Firefox 2
>> WinXP Firefox 2, IE 7
>>
>> Charsets: forceCharSet utf-8, forceCharSet = ''
>> Backend: alt_main.php, backend.php
>>
>> Greetings,
>>
>> Christoph Lindenmüller
>>
>>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20080106_csh_tooltip_span_tce.diff
Type: text/x-patch
Size: 8988 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080106/7b696100/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bildschirmfoto-1.png
Type: image/png
Size: 197208 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080106/7b696100/attachment-0001.png 


More information about the TYPO3-team-core mailing list