[TYPO3-v4] Broken CSH for select-type list with renderMode = checkbox

François Suter fsu-lists at cobweb.ch
Fri Jan 14 21:49:22 CET 2011


Hi all,

Due to the recent changes in the CSH rendering, CSH is not displayed 
correctly anymore in select-type list rendered as checkboxes (of which 
we now have many in the be_groups, since the default rendering mode was 
changed). Thus this bug [1] is now particularly visible.

The problem is that this particular use of CSH does not use the API. 
Just like for FlexForms I would like to change that situation so that 
all CSH throughout the Core uses the same API. Of course the situation 
is pretty different here, as this CSH does not refer to a CSH file, but 
uses a text assembled on a case-by-case basis in TCEforms (in 
t3lib_TCEforms::addSelectOptionsToItemArray()). This text is generally 
comprised of a title and a description, concatenated with a <br> tag.

To use the standard CSH rendering API here too, my idea is that rather 
than generating the above-mentioned text, we should assemble a small 
array with the title and the description. t3lib_BEfunc::wrapInHelp() 
would then be extended to accept an additional parameter, an array that 
supersedes whatever could be normally fetched from a CSH file. This 
makes it possible to display any kind of custom text as CSH.

This is easy enough. The problem which stopped is that the content of 
the tooltip is actually loaded using ExtDirect, so the custom title and 
description should be passed in the call, as they cannot possibly be 
retrieved inside that call otherwise. Following the existing code, I 
added that data to the tooltip's <span> tag in a similar way as what is 
currently done for transmitting the table and field:

<span data-description="bar" data-title="foo" data-field="dummy" 
data-table="dummy" href="#" class="t3-help-link" id="ext-gen22"><abbr 
class="t3-help-teaser-icon"><span class="t3-icon t3-icon-actions 
t3-icon-actions-system t3-icon-system-help-open">&nbsp;</span></abbr></span>

i.e. using a "data-description" and "data-title" attribute.

I could well enough retrieve these values inside 
t3lib/js/extjs/contexthelp.js, but for the life of me I couldn't pass it 
to extDirect_DataProvider_ContextHelp::getContextHelp(). I tried adding 
a title and description arguments to that method, but this was totally 
ignored.

How is this supposed to work?

And - more generally - do you agree with my idea on how to solve this issue?

Cheers

-- 

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch

[1] http://bugs.typo3.org/view.php?id=17024


More information about the TYPO3-project-v4 mailing list