[TYPO3-core] RFC #16465: Bug: TCE forms incorrectly render optgroup tags with icons

Bastian Waidelich bastian at typo3.org
Thu Nov 18 12:27:02 CET 2010


Hi again,

This is an SVN patch request.

Type: Bugfix

Bugtracker references:
http://bugs.typo3.org/view.php?id=16463

Branches:
trunk

Problem:
TYPO3 allows us to specify an icon that is displayed in front of options 
in BE selectors (this is currently only supported by Mozilla based 
browsers AFAIK).
Additionally it's possible to group option tags by inserting a 
"---div---" item, resulting in a <optgroup> tag.
Unfortunately the styling of the optgroups is currently broken, which 
makes them unusable in Mozilla (See attached snapshots).

Solution:
Create a new method optgroupTagStyle() that sets the correct style 
attributes for optgroup tags similar to optionTagStyle(). See attached 
patch.

Steps to reproduce:
Put following lines around the registration of a plugin to your ext_tables:

$TCA['tt_content']['columns']['list_type']['config']['items'][] = 
array('group header', '--div--', t3lib_extMgm::extRelPath($_EXTKEY) . 
'ext_icon.gif');

// t3lib_extMgm::addPlugin(...);

$TCA['tt_content']['columns']['list_type']['config']['items'][] = 
array('', '--div--');

Notes:
A proper support for optgroups would be especially useful in the plugin 
list which gets confusing with a lot of entries.

Background: we might add a new method to Extbase allowing you to 
register multiple plugins at once semantically grouping them together

Best,
Bastian
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 16465_tce_optgroup.patch
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101118/8014332e/attachment-0001.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: before.png
Type: image/png
Size: 132701 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101118/8014332e/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: after.png
Type: image/png
Size: 148395 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101118/8014332e/attachment-0003.png>


More information about the TYPO3-team-core mailing list