[CLEANUP] Remove hardcoded valign="top" in FormEngine 33/27833/4
authorBenjamin Mack <benni@b13.de>
Fri, 25 Jul 2014 18:48:09 +0000 (20:48 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Sat, 26 Jul 2014 14:20:38 +0000 (16:20 +0200)
There are several places in the TYPO3 Form Engine
where the styling information about tables (valign)
is hard-coded.

The patch removes that, styling is done via CSS.

Resolves: #56261
Releases: 6.3
Change-Id: Ibcc9bb7df3cf05e791eae7f16d91e0afa60ab65d
Reviewed-on: http://review.typo3.org/27833
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Marcin SÄ…gol <marcin@soee.pl>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Form/FormEngine.php
typo3/sysext/backend/Resources/Private/Templates/FormEngine.html
typo3/sysext/t3skin/Resources/Public/Css/structure/element_tceforms.css

index e0a0da7..f42dfad 100644 (file)
@@ -4359,7 +4359,7 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
                                $hookObject->dbFileIcons_postProcess($params, $selector, $thumbnails, $icons, $rightbox, $fName, $uidList, $additionalParams, $this);
                        }
                }
-               $str = '<table border="0" cellpadding="0" cellspacing="0" width="1">
+               $str = '<table border="0" cellpadding="0" cellspacing="0" width="1" class="t3-form-field-group-file">
                        ' . ($params['headers'] ? '
                                <tr>
                                        <td>' . $this->wrapLabels($params['headers']['selector']) . '</td>
@@ -4368,14 +4368,14 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
                                        <td>' . ($params['thumbnails'] ? $this->wrapLabels($params['headers']['items']) : '') . '</td>
                                </tr>' : '') . '
                        <tr>
-                               <td valign="top">' . $selector . $thumbnails;
+                               <td>' . $selector . $thumbnails;
                if (!$params['noList'] && $params['info'] !== '') {
                        $str .= '<span class="filetypes">' . $this->wrapLabels($params['info']) . '</span>';
                }
                $str .= '</td>
-                                       <td valign="top" class="icons">' . implode('<br />', $icons['L']) . '</td>
-                                       <td valign="top" class="icons">' . implode('<br />', $icons['R']) . '</td>
-                                       <td valign="top">' . $rightbox . '</td>
+                                       <td class="icons">' . implode('<br />', $icons['L']) . '</td>
+                                       <td class="icons">' . implode('<br />', $icons['R']) . '</td>
+                                       <td>' . $rightbox . '</td>
                        </tr>
                </table>';
                // Creating the hidden field which contains the actual value as a comma list.
index 65dd653..75cafde 100644 (file)
@@ -13,7 +13,7 @@
        <td colspan="2" class="formField-header"><span style="color:###FONTCOLOR_HEAD###;"###CLASSATTR_4###><strong>###FIELD_NAME###</strong></span></td>
 </tr>
 <tr ###BGCOLOR######CLASSATTR_1###>
-       <td colspan="2" class="formField-field" valign="top">
+       <td colspan="2" class="formField-field">
                <span class="t3-form-field-container">
                        <img name="cm_###FIELD_TABLE###_###FIELD_ID###_###FIELD_FIELD###" src="clear.gif" class="t3-TCEforms-contentchangedImg" alt="" />
                        <img name="req_###FIELD_TABLE###_###FIELD_ID###_###FIELD_FIELD###" src="clear.gif" class="t3-TCEforms-reqImg" alt="" />
@@ -26,7 +26,7 @@
        </td>
 </tr>
 <tr>
-       <td colspan="2" class="formField-field" valign="top">
+       <td colspan="2" class="formField-field">
                ###FIELD_PAL_LINK_ICON###
        </td>
 </tr>
 
 <!-- ###PALETTE_FIELDTEMPLATE### begin -->
 <tr ###BGCOLOR######CLASSATTR_1###>
-       <td colspan="2" nowrap="nowrap" valign="top">###FIELD_PALETTE###</td>
+       <td colspan="2" nowrap="nowrap">###FIELD_PALETTE###</td>
 </tr>
 <!-- ###PALETTE_FIELDTEMPLATE### end -->
 
 
 <!-- ###PALETTE_FIELDTEMPLATE_HEADER### begin -->
 <tr ###BGCOLOR_HEAD######CLASSATTR_2###>
-       <td colspan="2" nowrap="nowrap" valign="top" class="palette-header"><strong>###FIELD_HEADER###</strong></td>
+       <td colspan="2" nowrap="nowrap" class="palette-header"><strong>###FIELD_HEADER###</strong></td>
 </tr>
 <!-- ###PALETTE_FIELDTEMPLATE_HEADER### end -->
 
index f120972..cd432cd 100644 (file)
@@ -187,6 +187,7 @@ select option.c-divider {
        position: relative;
        padding-left: 10px;
        padding-right: 10px;
+       vertical-align: top;
 }
 
 .typo3-TCEforms .formField,
@@ -217,6 +218,10 @@ select option.c-divider {
        padding: 5px 0 5px 0;
 }
 
+.t3-form-field-group-file tr:last-child td {
+       vertical-align: top;
+}
+
 .typo3-TCEforms td.icons {
        padding: 2px;
 }