Index: typo3/sysext/t3skin/stylesheets/visual/element_tceforms.css =================================================================== --- typo3/sysext/t3skin/stylesheets/visual/element_tceforms.css (revision 10129) +++ typo3/sysext/t3skin/stylesheets/visual/element_tceforms.css (revision ) @@ -113,50 +113,44 @@ color: #fff; } -table.typo3-TCEforms-select-checkbox { +table.typo3-TCEforms-select-checkbox { - background-color: #efeff4; + background-color: #ffffff; border: 1px solid #aaa; } -table.typo3-TCEforms-select-checkbox tr { - background-color: #efeff4; +table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr.c-header td { + background-color: #fff; + font-weight: bold; } -table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr.c-selectedItem { - background-color: #d7dbe2; +table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr:nth-child(2n) { + background-color: #f7f7f7; } -table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr.c-unselectedItem { - background-color: #efeff4; +table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr.c-selectedItem { + background-color: #d8ecd0; } table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr.c-invalidItem { - background-color: #ff6600; + color: #dddddd; } -table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr.c-header-checkbox-controls td { - background-color: #b8bec9; - text-align: right; +table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr:hover { + background-color: #dedede; } -table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr.c-header-checkbox-controls td a { - color: white; +table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr.c-selectedItem:hover { + background-color: #abd99a; } -table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr.c-header td { - background-color: #fff; - border-bottom: 1px solid #999999; - font-weight: bold; +table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr.c-invalidItem:hover { + background-color: transparent; } -table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr td { - border-bottom: 1px #999 dashed; +table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr td.c-labelCell { + white-space: nowrap; } -table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr td.c-labelCell p.c-descr { - font-style: italic; -} - table.typo3-TCEforms optgroup.c-divider, select option.c-divider { background-color: #eee; @@ -440,4 +434,4 @@ background-position: 0% 50%; background-repeat:no-repeat; padding:1px 1px 1px 24px; -} \ No newline at end of file +} Index: typo3/sysext/t3skin/stylesheets/structure/element_tceforms.css =================================================================== --- typo3/sysext/t3skin/stylesheets/structure/element_tceforms.css (revision 10132) +++ typo3/sysext/t3skin/stylesheets/structure/element_tceforms.css (revision ) @@ -111,34 +111,36 @@ table.typo3-TCEforms table.typo3-TCEforms-select-checkbox { margin-bottom: 10px; - width: 98%; } +table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tbody { + display: block; + max-height: 300px; + overflow-y: scroll; +} + table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr td { - padding: 1px 3px 1px 3px; + vertical-align: middle; } +table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr.c-header td, +table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr td.c-checkbox, table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr td.c-labelCell { - padding-right: 30px; + padding: 1px 3px; } -table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr td.c-labelCell P.c-descr { - margin-left: 30px; +table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr td.c-labelCell { + min-width: 300px; } -table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr.c-header td { - padding-left: 4px; - padding-top: 10px; +table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr td.c-labelCell img { + margin-right: 5px; } -table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr.c-header-checkbox-controls td { - padding-right: 16px; +table.typo3-TCEforms table.typo3-TCEforms-select-checkbox td.c-descr { + width: 40px; } -table.typo3-TCEforms table.typo3-TCEforms-select-checkbox tr.c-header-checkbox-controls td a { - padding-left: 16px; -} - table.typo3-TCEforms table.typo3-TCEforms-select-checkbox td.c-descr img { float: right; } Index: t3lib/class.t3lib_tceforms.php =================================================================== --- t3lib/class.t3lib_tceforms.php (revision 10129) +++ t3lib/class.t3lib_tceforms.php (revision ) @@ -1773,8 +1773,13 @@ * @return string The HTML code for the item * @see getSingleField_typeSelect() */ - function getSingleField_typeSelect_checkbox($table, $field, $row, &$PA, $config, $selItems, $nMV_label) { + function getSingleField_typeSelect_checkbox( + $table, $field, $row, &$PA, $config, $selItems, $nMV_label) { + if (empty($selItems)) { + return ''; + } + // Get values in an array (and make unique, which is fine because there can be no duplicates anyway): $itemArray = array_flip($this->extractValuesOnlyFromValueLabelList($PA['itemFormElValue'])); @@ -1793,23 +1798,7 @@ foreach ($selItems as $p) { // Non-selectable element: if (!strcmp($p[1], '--div--')) { - if (count($setAll)) { - $tRows[] = ' + $tRows[] = ' - - ' . - '' . - htmlspecialchars($this->getLL('l_checkAll')) . - ' - ' . - htmlspecialchars($this->getLL('l_uncheckAll')) . - ' - - '; - $setAll = array(); - $unSetAll = array(); - } - - $tRows[] = ' ' . htmlspecialchars($p[0]) . ' '; @@ -1843,7 +1832,7 @@ $hasHelp = ($p[3] != ''); $label = t3lib_div::deHSCentities(htmlspecialchars($p[0])); - $help = $hasHelp ? '' . $label . '' . + $help = $hasHelp ? '' . $label . '' . '' . $GLOBALS['LANG']->hscAndCharConv(nl2br(trim(htmlspecialchars($p[3]))), false) . '' : ''; if ($hasHelp && $this->edit_showFieldHelp == 'icon') { @@ -1856,7 +1845,7 @@ $tRows[] = ' - insertDefStyle('check') . ' name="' . htmlspecialchars($PA['itemFormElName'] . '[' . $c . ']') . '" value="' . htmlspecialchars($p[1]) . '"' . $sM . ' onclick="' . htmlspecialchars($sOnChange) . '"' . $PA['onFocus'] . ' /> + insertDefStyle('check') . ' name="' . htmlspecialchars($PA['itemFormElName'] . '[' . $c . ']') . '" value="' . htmlspecialchars($p[1]) . '"' . $sM . ' onclick="' . htmlspecialchars($sOnChange) . '"' . $PA['onFocus'] . ' /> ' . $this->getIconHtml($selIcon) . $label . @@ -1866,22 +1855,7 @@ $c++; } } - - // Remaining checkboxes will get their set-all link: - if (count($setAll)) { - $tRows[] = ' - - ' . - '' . - htmlspecialchars($this->getLL('l_checkAll')) . - ' - ' . - htmlspecialchars($this->getLL('l_uncheckAll')) . - ' - - '; - } + } - } // Remaining values (invalid): if (count($itemArray) && !$PA['fieldTSConfig']['disableNoMatchingValueElement'] && !$config['disableNoMatchingValueElement']) { @@ -1889,7 +1863,7 @@ // Compile tag: array_unshift($tRows, ' - insertDefStyle('check') . ' name="' . htmlspecialchars($PA['itemFormElName'] . '[' . $c . ']') . '" value="' . htmlspecialchars($theNoMatchValue) . '" checked="checked" onclick="' . htmlspecialchars($sOnChange) . '"' . $PA['onFocus'] . $disabled . ' /> + insertDefStyle('check') . ' name="' . htmlspecialchars($PA['itemFormElName'] . '[' . $c . ']') . '" value="' . htmlspecialchars($theNoMatchValue) . '" checked="checked" onclick="' . htmlspecialchars($sOnChange) . '"' . $PA['onFocus'] . $disabled . ' /> ' . t3lib_div::deHSCentities(htmlspecialchars(@sprintf($nMV_label, $theNoMatchValue))) . '  @@ -1901,18 +1875,31 @@ // Add an empty hidden field which will send a blank value if all items are unselected. $item .= ''; - // Add revert icon - if (is_array($restoreCmd)) { - $item .= '' . - t3lib_iconWorks::getSpriteIcon('actions-edit-undo', array('title' => htmlspecialchars($this->getLL('l_revertSelection')))) . ''; + // Remaining checkboxes will get their set-all link: + if (count($setAll)) { + $tableHead = ' + + + + + + + '; } // Implode rows in table: $item .= ' ' . - implode('', $tRows) . ' + $tableHead . + '' . implode('', $tRows) . '
'; + // Add revert icon + if (is_array($restoreCmd)) { + $item .= '' . + t3lib_iconWorks::getSpriteIcon('actions-edit-undo', array('title' => htmlspecialchars($this->getLL('l_revertSelection')))) . ''; + } + return $item; }