Index: t3lib/class.t3lib_tceforms.php =================================================================== --- t3lib/class.t3lib_tceforms.php (Revision 7660) +++ t3lib/class.t3lib_tceforms.php (Arbeitskopie) @@ -4951,20 +4951,34 @@ * @param array The palette array to print * @return string HTML output */ - function printPalette($palArr) { + function printPalette($palArr) { + $fieldAttributes = $labelAttributes = ''; // Init color/class attributes: - $ccAttr2 = $this->colorScheme[2] ? ' bgcolor="'.$this->colorScheme[2].'"' : ''; - $ccAttr2.= $this->classScheme[2] ? ' class="'.$this->classScheme[2].'"' : ''; - $ccAttr4 = $this->colorScheme[4] ? ' style="color:'.$this->colorScheme[4].'"' : ''; - $ccAttr4.= $this->classScheme[4] ? ' class="'.$this->classScheme[4].'"' : ''; + if ($this->colorScheme[2]) { + $labelAttributes .= ' bgcolor="' . $this->colorScheme[2] . '"'; + } + if ($this->classScheme[2]) { + $labelAttributes .= ' class="t3-form-palette-field-label ' . $this->classScheme[2] . '"'; + } else { + $labelAttributes .= ' class="t3-form-palette-field-label"'; + } + + if ($this->colorScheme[4]) { + $fieldAttributes .= ' style="color: ' . $this->colorScheme[4] . '"'; + } + + if ($this->classScheme[4]) { + $fieldAttributes .= ' class="' . $this->classScheme[4] . '"'; + } + $row = 0; $hRow = $iRow = array(); $lastLineWasLinebreak = FALSE; - // Traverse palette fields and render them into table rows: - foreach($palArr as $content) { + // Traverse palette fields and render them into containers: + foreach ($palArr as $content) { if ($content['NAME'] === '--linebreak--') { if (!$lastLineWasLinebreak) { $row++; @@ -4972,43 +4986,28 @@ } } else { $lastLineWasLinebreak = FALSE; - $hRow[$row][] = '  - '. - ''. - $content['NAME']. - ''. - ''; - $iRow[$row][] = '' . - ''. - ''. - ' - '. - $content['ITEM']. - $content['HELP_ICON']. - ''; + $iRow[$row][] = '
' . + '' . + '' . + $content['NAME'] . ' ' . + $content['HELP_ICON'] . + '' . + '' . + $content['ITEM'] . + '
'; + } } - } - // Final wrapping into the table: - $out=''; - for ($i=0; $i<=$row; $i++) { - $out .= ' - - '. - implode(' - ', $hRow[$i]) . ' - - - '. - implode(' - ', $iRow[$i]) . ' - '; + // Final wrapping into the fieldset: + $out = '
'; + for ($i = 0; $i <= $row; $i++) { + $out .= implode($iRow[$i]); } - $out .= '
'; - + $out .= ''; return $out; } + /** * Returns help-text ICON if configured for. * Index: typo3/sysext/t3skin/stylesheets/structure/element_palette.css =================================================================== --- typo3/sysext/t3skin/stylesheets/structure/element_palette.css (Revision 7660) +++ typo3/sysext/t3skin/stylesheets/structure/element_palette.css (Arbeitskopie) @@ -4,6 +4,22 @@ $Id$ - - - - - - - - - - - - - - - - - - - - - */ + +div.t3-form-palette-field-container { + display: block; + float: left; + margin-right: 2px; + margin-bottom: 2px; + padding: 2px 10px; +} + +label.t3-form-palette-field-label { + white-space: nowrap; + line-height: 20px; +} + + +/* kept for backwards-compatibility reasons, remove sometime in 2011 */ body#typo3-alt-palette-php { margin-left: 6px; margin-top: 8px; Index: typo3/sysext/t3skin/stylesheets/visual/element_palette.css =================================================================== --- typo3/sysext/t3skin/stylesheets/visual/element_palette.css (Revision 7660) +++ typo3/sysext/t3skin/stylesheets/visual/element_palette.css (Arbeitskopie) @@ -4,6 +4,12 @@ $Id$ - - - - - - - - - - - - - - - - - - - - - */ +fieldset.t3-form-palette-fieldset { + border: none; + background: #E8E8F2; +} + +/* kept for backwards-compatibility reasons, remove sometime in 2011 */ body#typo3-alt-palette-php { background-image: url('../../icons/gfx/topmenu_background_palette.jpg'); }