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

Ernesto Baschny [cron IT] ernst at cron-it.de
Thu Jan 20 17:39:58 CET 2011


Hi Francois,

sorry, maybe this is what you wrote, but we don't need any ExtDirect in
this situation, isn't that so? What was the solution? Or is the solution
still pending (unclear from the comments both of you did in reply to
this thread). :)

In TYPO3.ContextHelp.showToolTipHelp() (contexthelp.js) we currently
simply assume that the information needs to be fetched from the server.
For this case we don't. So instead of filling:

	var table = link.getAttribute('data-table');
	var field = link.getAttribute('data-field');

We would fill "data-header" and "data-content" and if this is available
it is shown right away, by calling something like:

	tip.body.dom.innerHTML = link.getAttribute('data-content');
	tip.setTitle(link.getAttribute('data-header'));

Hope I've got it right, and that you were thinking in a similar way.

Cheers,
Ernesto


François Suter schrieb am 14.01.2011 21:49:
> 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
> 



More information about the TYPO3-project-v4 mailing list