Follow-up to #16857: Reverted the "renderInverted" feature and its use in the negated...
authorErnesto Baschny <ernst@cron-it.de>
Fri, 7 Jan 2011 19:09:50 +0000 (19:09 +0000)
committerErnesto Baschny <ernst@cron-it.de>
Fri, 7 Jan 2011 19:09:50 +0000 (19:09 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@10004 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tceforms.php
t3lib/stddb/tbl_pages.php
typo3/sysext/cms/locallang_tca.xml
typo3/sysext/cms/locallang_ttc.xml
typo3/sysext/cms/tbl_tt_content.php
typo3/sysext/css_styled_content/flexform_ds.xml
typo3/sysext/css_styled_content/locallang_db.xml

index bf72567..b771297 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-01-07  Ernesto Baschny  <ernst@cron-it.de>
+
+       * Follow-up to #16857: Reverted the "renderInverted" feature and its use in the negated checkboxes
+
 2011-01-06  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed issue #16940: htmlArea RTE: Log magic image creation failures to syslog
index 90bc332..5996254 100644 (file)
@@ -1404,17 +1404,13 @@ class t3lib_TCEforms {
                                if (!($c % $cols)) {
                                        $item .= '<tr>';
                                }
-                               $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 .= '<td nowrap="nowrap">' .
-                                       '<input type="checkbox"' . $this->insertDefStyle('check') .
-                                               ' value="1" name="' . $cBName . '"' . $cBP .
-                                               $disabled . ' id="' . $cBID . '" ' .
-                                       ' />' .
-                                       $this->wrapLabels('<label for="' . $cBID . '">' . htmlspecialchars($p[0]) . '</label>&nbsp;') .
-                                       '</td>';
+                                                '<input type="checkbox"' . $this->insertDefStyle('check') . ' value="1" name="' . $cBName . '"' . $cBP . $disabled . ' id="' . $cBID . '" />' .
+                                                $this->wrapLabels('<label for="' . $cBID . '">' . htmlspecialchars($p[0]) . '</label>&nbsp;') .
+                                                '</td>';
                                if (($c % $cols) + 1 == $cols) {
                                        $item .= '</tr>';
                                }
@@ -1432,16 +1428,12 @@ class t3lib_TCEforms {
                } 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 ? '<br />' : '') .
-                                       '<input type="checkbox"' . $this->insertDefStyle('check') .
-                                               ' value="1" name="' . $cBName . '"' . $cBP .
-                                               $PA['onFocus'] . $disabled . ' id="' . $cBID . '" ' .
-                                       ' />' .
-                                       $this->wrapLabels('<label for="' . $cBID . '">' . htmlspecialchars($p[0]) . '</label>');
+                                                '<input type="checkbox"' . $this->insertDefStyle('check') . ' value="1" name="' . $cBName . '"' . $cBP . $PA['onFocus'] . $disabled . ' id="' . $cBID . '" />' .
+                                                $this->wrapLabels('<label for="' . $cBID . '">' . htmlspecialchars($p[0]) . '</label>');
                        }
                }
                if (!$disabled) {
@@ -4282,26 +4274,12 @@ class t3lib_TCEforms {
         * @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 5ec662c..b6bfc25 100644 (file)
@@ -157,11 +157,10 @@ $TCA['pages'] = array(
                        '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 @@ $TCA['pages'] = array(
                        '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 @@ $TCA['pages'] = array(
                        '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 @@ $TCA['pages'] = array(
                        '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 165bd8a..5a36346 100755 (executable)
@@ -43,6 +43,7 @@
                        <label index="pages.fe_group_formlabel">Usergroup Access Rights</label>
                        <label index="pages.hidden">Hide page:</label>
                        <label index="pages.hidden_formlabel">Page</label>
+                       <label index="pages.hidden_checkbox_1_formlabel">Disable</label>
                        <label index="pages.layout_formlabel">Frontend Layout</label>
                        <label index="pages.layout.I.1">Layout 1</label>
                        <label index="pages.layout.I.2">Layout 2</label>
@@ -56,7 +57,8 @@
                        <label index="pages.nav_title">Navigation title:</label>
                        <label index="pages.nav_title_formlabel">Alternative Navigation Title</label>
                        <label index="pages.nav_hide">Hide in menu:</label>
-                       <label index="pages.nav_hide_formlabel">Show in Menus</label>
+                       <label index="pages.nav_hide_formlabel">In menus</label>
+                       <label index="pages.nav_hide_checkbox_1_formlabel">Hide</label>
                        <label index="pages.subtitle">Subtitle:</label>
                        <label index="pages.subtitle_formlabel">Subtitle</label>
                        <label index="pages.target">Target:</label>
                        <label index="pages.tabs.behaviour">Behaviour</label>
                        <label index="pages.no_cache">No cache:</label>
                        <label index="pages.no_cache_formlabel">Cache</label>
+                       <label index="pages.no_cache_checkbox_1_formlabel">Disable</label>
                        <label index="pages.no_search">No search:</label>
                        <label index="pages.no_search_formlabel">Include in Search</label>
+                       <label index="pages.no_search_checkbox_1_formlabel">Disable</label>
                        <label index="pages.shortcut_mode">Shortcut mode:</label>
                        <label index="pages.shortcut_mode_formlabel">Shortcut Mode</label>
                        <label index="pages.shortcut_mode.I.0">Selected page</label>
index e8e450e..7ce90e8 100755 (executable)
                        <label index="imageborder">Border:</label>
                        <label index="imageborder_formlabel">Border</label>
                        <label index="image_noRows">No rows:</label>
+                       <label index="image_noRows_formlabel">Horizontal Rows</label>
+                       <label index="image_noRows.I.0">Deactivate</label>
                        <label index="image_noRows_formlabel">Display as Rows</label>
                        <label index="image_link">Link:</label>
                        <label index="image_link_formlabel">Links (Separate with Commas, One Link per Image)</label>
                        <label index="linkToTop_formlabel">Append with Link to Top of Page</label>
                        <label index="rte_enabled">Disable Rich Text Editor:</label>
                        <label index="rte_enabled_formlabel">Rich Text Editor</label>
+                       <label index="rte_enabled.I.0">Disable</label>
                        <label index="pi_flexform">Plugin Options</label>
                        <label index="ALT.imgOptions">Image Options</label>
                        <label index="ALT.imgLinks">Image Links</label>
                        <label index="sys_language_uid_formlabel">Language</label>
                        <label index="subheader_formlabel">Subheader</label>
                        <label index="hidden_formlabel">Content Element</label>
+                       <label index="hidden.I.0">Disable</label>
                        <label index="starttime_formlabel">Publish Date</label>
                        <label index="endtime_formlabel">Expiration Date</label>
                        <label index="fe_group_formlabel">Usergroup Access Rights</label>
index 7c60cca..fa096d9 100755 (executable)
@@ -171,10 +171,9 @@ $TCA['tt_content'] = array(
                        '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 @@ $TCA['tt_content'] = array(
                        '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 @@ $TCA['tt_content'] = array(
                        '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 5f474e1..767058c 100644 (file)
                                                        <label>LLL:EXT:css_styled_content/locallang_db.xml:tt_content.tx_cssstyledcontent_acctables_nostyles</label>
                                                        <config>
                                                                <type>check</type>
-                                                               <renderInverted>1</renderInverted>
-                                                               <items type="array">
-                                                                       <numIndex index="1" type="array">
-                                                                               <numIndex index="0">LLL:EXT:lang/locallang_core.xml:labels.enabled</numIndex>
-                                                                               <numIndex index="1">1</numIndex>
-                                                                       </numIndex>
-                                                               </items>
                                                        </config>
                                                </TCEforms>
                                        </acctables_nostyles>
index 8bc7118..6356215 100644 (file)
@@ -14,7 +14,7 @@
                        <label index="tt_content.tx_cssstyledcontent_acctables_headerpos.I.1">Top</label>
                        <label index="tt_content.tx_cssstyledcontent_acctables_headerpos.I.2">Left</label>
                        <label index="tt_content.tx_cssstyledcontent_acctables_headerpos">Table Header Position</label>
-                       <label index="tt_content.tx_cssstyledcontent_acctables_nostyles">Use CSS Styles</label>
+                       <label index="tt_content.tx_cssstyledcontent_acctables_nostyles">No CSS styles for this table</label>
                        <label index="tt_content.tx_cssstyledcontent_acctables_tableclass">Additional CSS Class</label>
                        <label index="tt_content.tx_cssstyledcontent_tableparsing">CSV parsing</label>
                        <label index="tt_content.tx_cssstyledcontent_tableparsing_quote">Text Delimiter</label>