Index: ChangeLog =================================================================== --- ChangeLog (Revision 10003) +++ ChangeLog (Arbeitskopie) @@ -1,3 +1,7 @@ +2011-01-07 Ernesto Baschny + + * Follow-up to #16857: Reverted the "renderInverted" feature and its use in the negated checkboxes + 2011-01-06 Stanislas Rolland * Fixed issue #16940: htmlArea RTE: Log magic image creation failures to syslog Index: t3lib/stddb/tbl_pages.php =================================================================== --- t3lib/stddb/tbl_pages.php (Revision 10003) +++ t3lib/stddb/tbl_pages.php (Arbeitskopie) @@ -157,11 +157,10 @@ 'label' => 'LLL:EXT:cms/locallang_tca.xml:pages.hidden', 'config' => array( 'type' => 'check', - 'renderInverted' => TRUE, 'default' => '1', 'items' => array( '1' => array( - '0' => 'LLL:EXT:lang/locallang_core.xml:labels.show', + '0' => 'LLL:EXT:cms/locallang_tca.xml:pages.hidden_checkbox_1_formlabel', ), ), ), @@ -295,10 +294,9 @@ 'label' => 'LLL:EXT:cms/locallang_tca.xml:pages.nav_hide', 'config' => array( 'type' => 'check', - 'renderInverted' => TRUE, 'items' => array( '1' => array( - '0' => 'LLL:EXT:lang/locallang_core.xml:labels.enabled', + '0' => 'LLL:EXT:cms/locallang_tca.xml:pages.nav_hide_checkbox_1_formlabel', ), ), ), @@ -460,10 +458,9 @@ 'label' => 'LLL:EXT:cms/locallang_tca.xml:pages.no_cache', 'config' => array( 'type' => 'check', - 'renderInverted' => TRUE, 'items' => array( '1' => array( - '0' => 'LLL:EXT:lang/locallang_core.xml:labels.enabled', + '0' => 'LLL:EXT:cms/locallang_tca.xml:pages.no_cache_checkbox_1_formlabel', ), ), ), @@ -473,10 +470,9 @@ 'label' => 'LLL:EXT:cms/locallang_tca.xml:pages.no_search', 'config' => array( 'type' => 'check', - 'renderInverted' => TRUE, 'items' => array( '1' => array( - '0' => 'LLL:EXT:lang/locallang_core.xml:labels.enabled', + '0' => 'LLL:EXT:cms/locallang_tca.xml:pages.no_search_checkbox_1_formlabel', ), ), ), Index: t3lib/class.t3lib_tceforms.php =================================================================== --- t3lib/class.t3lib_tceforms.php (Revision 10003) +++ t3lib/class.t3lib_tceforms.php (Arbeitskopie) @@ -1404,17 +1404,13 @@ if (!($c % $cols)) { $item .= ''; } - $renderInverted = !empty($config['renderInverted']) ? TRUE : FALSE; - $cBP = $this->checkBoxParams($PA['itemFormElName'], $thisValue, $c, count($selItems), implode('', $PA['fieldChangeFunc']), $renderInverted); + $cBP = $this->checkBoxParams($PA['itemFormElName'], $thisValue, $c, count($selItems), implode('', $PA['fieldChangeFunc'])); $cBName = $PA['itemFormElName'] . '_' . $c; $cBID = $PA['itemFormElID'] . '_' . $c; $item .= '' . - 'insertDefStyle('check') . - ' value="1" name="' . $cBName . '"' . $cBP . - $disabled . ' id="' . $cBID . '" ' . - ' />' . - $this->wrapLabels(' ') . - ''; + 'insertDefStyle('check') . ' value="1" name="' . $cBName . '"' . $cBP . $disabled . ' id="' . $cBID . '" />' . + $this->wrapLabels(' ') . + ''; if (($c % $cols) + 1 == $cols) { $item .= ''; } @@ -1432,16 +1428,12 @@ } else { for ($c = 0; $c < count($selItems); $c++) { $p = $selItems[$c]; - $renderInverted = !empty($config['renderInverted']) ? TRUE : FALSE; - $cBP = $this->checkBoxParams($PA['itemFormElName'], $thisValue, $c, count($selItems), implode('', $PA['fieldChangeFunc']), $renderInverted); + $cBP = $this->checkBoxParams($PA['itemFormElName'], $thisValue, $c, count($selItems), implode('', $PA['fieldChangeFunc'])); $cBName = $PA['itemFormElName'] . '_' . $c; $cBID = $PA['itemFormElID'] . '_' . $c; $item .= ($c > 0 ? '
' : '') . - 'insertDefStyle('check') . - ' value="1" name="' . $cBName . '"' . $cBP . - $PA['onFocus'] . $disabled . ' id="' . $cBID . '" ' . - ' />' . - $this->wrapLabels(''); + 'insertDefStyle('check') . ' value="1" name="' . $cBName . '"' . $cBP . $PA['onFocus'] . $disabled . ' id="' . $cBID . '" />' . + $this->wrapLabels(''); } } if (!$disabled) { @@ -4282,26 +4274,12 @@ * @param string Additional JavaScript for the onclick handler. * @return string The onclick attribute + possibly the checked-option set. */ - protected function checkBoxParams($itemName, $thisValue, $c, $iCount, $addFunc = '', $renderInverted = FALSE) { - $toggleOn = $this->elName($itemName) . '.value&' . (pow(2, $iCount) - 1 - pow(2, $c)); - $toggleOff = $this->elName($itemName) . '.value|' . pow(2, $c); - $isChecked = ($thisValue & pow(2, $checkboxNumber)); - - if ($renderInverted) { - $isChecked = !$isChecked; - - $tmp = $toggleOn; - $toggleOn = $toggleOff; - $toggleOff = $tmp; - } - - $toggle = $this->elName($itemName) . '.value=this.checked?' . - '(' . $toggleOff . '):(' . $toggleOn . ');'; - - $onclick = ' onclick="' . htmlspecialchars($toggle . $addFunc) . '" '; - $checked = $isChecked ? ' checked="checked" ' : ''; - - return $onclick . $checked; + function checkBoxParams($itemName, $thisValue, $c, $iCount, $addFunc = '') { + $onClick = $this->elName($itemName) . '.value=this.checked?(' . $this->elName($itemName) . '.value|' . pow(2, $c) . '):(' . $this->elName($itemName) . '.value&' . (pow(2, $iCount) - 1 - pow(2, $c)) . ');' . + $addFunc; + $str = ' onclick="' . htmlspecialchars($onClick) . '"' . + (($thisValue & pow(2, $c)) ? ' checked="checked"' : ''); + return $str; } /** Index: typo3/sysext/cms/locallang_tca.xml =================================================================== --- typo3/sysext/cms/locallang_tca.xml (Revision 10003) +++ typo3/sysext/cms/locallang_tca.xml (Arbeitskopie) @@ -43,6 +43,7 @@ + @@ -56,7 +57,8 @@ - + + @@ -96,8 +98,10 @@ + + Index: typo3/sysext/cms/locallang_ttc.xml =================================================================== --- typo3/sysext/cms/locallang_ttc.xml (Revision 10003) +++ typo3/sysext/cms/locallang_ttc.xml (Arbeitskopie) @@ -121,6 +121,8 @@ + + @@ -241,6 +243,7 @@ + @@ -304,6 +307,7 @@ + Index: typo3/sysext/cms/tbl_tt_content.php =================================================================== --- typo3/sysext/cms/tbl_tt_content.php (Revision 10003) +++ typo3/sysext/cms/tbl_tt_content.php (Arbeitskopie) @@ -171,10 +171,9 @@ 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden', 'config' => array( 'type' => 'check', - 'renderInverted' => TRUE, 'items' => array ( '1' => array( - '0' => 'LLL:EXT:lang/locallang_core.xml:labels.show', + '0' => 'LLL:EXT:cms/locallang_ttc.xml:hidden.I.0', ), ), ), @@ -809,10 +808,9 @@ 'label' => 'LLL:EXT:cms/locallang_ttc.xml:image_noRows', 'config' => array( 'type' => 'check', - 'renderInverted' => TRUE, 'items' => array ( '1' => array( - '0' => 'LLL:EXT:lang/locallang_core.xml:labels.enabled', + '0' => 'LLL:EXT:cms/locallang_ttc.xml:image_noRows.I.0', ), ), ), @@ -1599,11 +1597,10 @@ 'label' => 'LLL:EXT:cms/locallang_ttc.xml:rte_enabled', 'config' => array( 'type' => 'check', - 'renderInverted' => TRUE, 'showIfRTE' => 1, 'items' => array( '1' => array( - '0' => 'LLL:EXT:lang/locallang_core.xml:labels.enabled', + '0' => 'LLL:EXT:cms/locallang_ttc.xml:rte_enabled.I.0', ), ), ), Index: typo3/sysext/css_styled_content/locallang_db.xml =================================================================== --- typo3/sysext/css_styled_content/locallang_db.xml (Revision 10003) +++ typo3/sysext/css_styled_content/locallang_db.xml (Arbeitskopie) @@ -14,7 +14,7 @@ - + Index: typo3/sysext/css_styled_content/flexform_ds.xml =================================================================== --- typo3/sysext/css_styled_content/flexform_ds.xml (Revision 10003) +++ typo3/sysext/css_styled_content/flexform_ds.xml (Arbeitskopie) @@ -75,13 +75,6 @@ check - 1 - - - LLL:EXT:lang/locallang_core.xml:labels.enabled - 1 - -