[TASK] Wrap very wide t3-tables in table-fit 60/34760/3
authorFelix Kopp <felix-source@phorax.com>
Sat, 29 Nov 2014 02:07:01 +0000 (03:07 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 29 Nov 2014 14:57:53 +0000 (15:57 +0100)
Wide table listings are wrapped in table-fit.

Resolves: #63417
Releases: master
Change-Id: Idc50242b7c3124c7e17da07d25ba3e2af03eeaed
Reviewed-on: http://review.typo3.org/34760
Reviewed-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Tested-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/beuser/Resources/Private/Templates/BackendUser/Index.html
typo3/sysext/beuser/Resources/Private/Templates/Permission/Index.html
typo3/sysext/frontend/Classes/Controller/TranslationStatusController.php
typo3/sysext/tstemplate/Classes/Controller/TemplateAnalyzerModuleFunctionController.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateInformationModuleFunctionController.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php
typo3/sysext/wizard_crpages/Classes/Controller/CreatePagesWizardModuleFunctionController.php
typo3/sysext/wizard_sortpages/Classes/View/SortPagesWizardModuleFunction.php

index fc1b02e..1ce212d 100644 (file)
@@ -372,14 +372,16 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                        }
                        // CSH:
                        $out = BackendUtility::cshItem($this->descrTable, ('func_' . $pKey)) . '
-                               <table class="t3-table typo3-page-pages">' .
-                                       '<thead>' .
-                                               $this->addelement(1, '', $theData) .
-                                       '</thead>' .
-                                       '<tbody>' .
-                                               $out .
-                                       '</tbody>' .
-                               '</table>';
+                               <div class="table-fit">
+                                       <table class="t3-table typo3-page-pages">' .
+                                               '<thead>' .
+                                                       $this->addelement(1, '', $theData) .
+                                               '</thead>' .
+                                               '<tbody>' .
+                                                       $out .
+                                               '</tbody>' .
+                                       '</table>
+                               </div>';
                }
                return $out;
        }
index 742e67d..941b324 100644 (file)
        </f:comment>
 
        <f:be.widget.paginate objects="{backendUsers}" as="paginatedBackendUsers" configuration="{itemsPerPage: 50, insertAbove: 1, insertBelow: 1}">
-               <table class="t3-table">
-                       <thead>
-                               <tr>
-                                       <th class="col-icon"></th>
-                                       <th class="col-title"><f:translate key="userName" /> / <f:translate key="realName" /></th>
-                                       <th class="col-control"></th>
-                                       <th><f:translate key="lastLogin" /></th>
-                               </tr>
-                       </thead>
-                       <tbody>
-                               <f:for each="{paginatedBackendUsers}" as="backendUser">
-                                       <f:render partial="BackendUser/IndexListRow" arguments="{demand: demand, backendUser: backendUser, dateFormat: dateFormat, timeFormat: timeFormat, returnUrl: returnUrl}" />
-                               </f:for>
-                               <f:comment>
-                                       Footer row: no officially defined style yet
-                               </f:comment>
-                               <tr>
-                                       <td colspan="4">
-                                               <f:count subject="{backendUsers}" /> <f:translate key="users" />
-                                       </td>
-                               </tr>
-                       </tbody>
-               </table>
+               <div class="table-fit">
+                       <table class="t3-table">
+                               <thead>
+                                       <tr>
+                                               <th class="col-icon"></th>
+                                               <th class="col-title"><f:translate key="userName" /> / <f:translate key="realName" /></th>
+                                               <th class="col-control"></th>
+                                               <th><f:translate key="lastLogin" /></th>
+                                       </tr>
+                               </thead>
+                               <tbody>
+                                       <f:for each="{paginatedBackendUsers}" as="backendUser">
+                                               <f:render partial="BackendUser/IndexListRow" arguments="{demand: demand, backendUser: backendUser, dateFormat: dateFormat, timeFormat: timeFormat, returnUrl: returnUrl}" />
+                                       </f:for>
+                                       <f:comment>
+                                               Footer row: no officially defined style yet
+                                       </f:comment>
+                                       <tr>
+                                               <td colspan="4">
+                                                       <f:count subject="{backendUsers}" /> <f:translate key="users" />
+                                               </td>
+                                       </tr>
+                               </tbody>
+                       </table>
+               </div>
        </f:be.widget.paginate>
 </f:section>
index 641c1f5..0724327 100644 (file)
                <f:form.select id="depth" value="{depth}" options="{depthOptions}" additionalAttributes="{onchange: 'jumpToUrl(\'{depthBaseUrl}\'.replace(\'__DEPTH__\', this.options[this.selectedIndex].value), this);'}" />
        </div>
 
-       <table class="t3-table" id="typo3-permissionList">
-               <thead>
-               <tr>
-                       <th colspan="2">&nbsp;</th>
-                       <th><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:Owner" /></th>
-                       <th align="center"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:Group" /></th>
-                       <th align="center"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:Everybody" /></th>
-                       <th align="center"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:EditLock" /></th>
-               </tr>
-               </thead>
-               <f:for each="{viewTree}" as="data">
+       <div class="table-fit">
+               <table class="t3-table" id="typo3-permissionList">
+                       <thead>
                        <tr>
-                               <f:if condition="{data.cellAttrib}">
-                                       <f:then>
-                                               <td align="left" nowrap="nowrap" {data.cellAttrib}>
-                                                       <f:format.raw>{data.html}</f:format.raw>
-                                               </td>
-                                       </f:then>
-                                       <f:else>
-                                               <td align="left" nowrap="nowrap" {data.groupName}>
-                                                       <f:format.raw>{data.html}</f:format.raw>
-                                               </td>
-                                       </f:else>
-                               </f:if>
-                               <f:if condition="{data.editPermsAllowed}">
-                                       <f:then>
-                                               <td>
-                                                       <f:if condition="{data.id} > 0">
-                                                               <f:link.action action="edit" arguments="{id: data.id, depth: depth}" title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:ch_permissions')}">
-                                                                       <bu:spriteManagerIcon iconName="actions-document-open" />
-                                                               </f:link.action>
-                                                       </f:if>
-                                               </td>
-                                       </f:then>
-                                       <f:else>
-                                               <td></td>
-                                       </f:else>
-                               </f:if>
-                               <td nowrap="nowrap"><f:format.raw>{data.userPermissions}</f:format.raw></td>
-                               <td nowrap="nowrap"><f:format.raw>{data.groupPermissions}</f:format.raw></td>
-                               <td nowrap="nowrap"><f:format.raw>{data.otherPermissions}</f:format.raw></td>
-                               <td nowrap="nowrap">
-                               <f:if condition="{data.id} > 0">
-                                       <span id="el_{data.id}">
-                                               <f:if condition="{data.editLock}">
-                                                       <f:then>
-                                                               <a class="editlock" data-page="{data.pageId}" data-lockstate="1" title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:EditLock_descr')}">
-                                                                       <bu:spriteManagerIcon iconName="status-warning-lock" />
-                                                               </a>
-                                                       </f:then>
-                                                       <f:else>
-                                                               <a class="editlock" data-page="{data.pageId}" data-lockstate="0" title="Enable the &raquo;Admin-only&laquo; edit lock for this page">
-                                                                       [+]
-                                                               </a>
-                                                       </f:else>
-                                               </f:if>
-                                       </span>
-                               </f:if>
+                               <th colspan="2">&nbsp;</th>
+                               <th><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:Owner" /></th>
+                               <th align="center"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:Group" /></th>
+                               <th align="center"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:Everybody" /></th>
+                               <th align="center"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:EditLock" /></th>
                        </tr>
-               </f:for>
-       </table>
+                       </thead>
+                       <f:for each="{viewTree}" as="data">
+                               <tr>
+                                       <f:if condition="{data.cellAttrib}">
+                                               <f:then>
+                                                       <td align="left" nowrap="nowrap" {data.cellAttrib}>
+                                                               <f:format.raw>{data.html}</f:format.raw>
+                                                       </td>
+                                               </f:then>
+                                               <f:else>
+                                                       <td align="left" nowrap="nowrap" {data.groupName}>
+                                                               <f:format.raw>{data.html}</f:format.raw>
+                                                       </td>
+                                               </f:else>
+                                       </f:if>
+                                       <f:if condition="{data.editPermsAllowed}">
+                                               <f:then>
+                                                       <td>
+                                                               <f:if condition="{data.id} > 0">
+                                                                       <f:link.action action="edit" arguments="{id: data.id, depth: depth}" title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:ch_permissions')}">
+                                                                               <bu:spriteManagerIcon iconName="actions-document-open" />
+                                                                       </f:link.action>
+                                                               </f:if>
+                                                       </td>
+                                               </f:then>
+                                               <f:else>
+                                                       <td></td>
+                                               </f:else>
+                                       </f:if>
+                                       <td nowrap="nowrap"><f:format.raw>{data.userPermissions}</f:format.raw></td>
+                                       <td nowrap="nowrap"><f:format.raw>{data.groupPermissions}</f:format.raw></td>
+                                       <td nowrap="nowrap"><f:format.raw>{data.otherPermissions}</f:format.raw></td>
+                                       <td nowrap="nowrap">
+                                       <f:if condition="{data.id} > 0">
+                                               <span id="el_{data.id}">
+                                                       <f:if condition="{data.editLock}">
+                                                               <f:then>
+                                                                       <a class="editlock" data-page="{data.pageId}" data-lockstate="1" title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:EditLock_descr')}">
+                                                                               <bu:spriteManagerIcon iconName="status-warning-lock" />
+                                                                       </a>
+                                                               </f:then>
+                                                               <f:else>
+                                                                       <a class="editlock" data-page="{data.pageId}" data-lockstate="0" title="Enable the &raquo;Admin-only&laquo; edit lock for this page">
+                                                                               [+]
+                                                                       </a>
+                                                               </f:else>
+                                                       </f:if>
+                                               </span>
+                                       </f:if>
+                               </tr>
+                       </f:for>
+               </table>
+       </div>
 
        <br />
        <f:format.raw>{cshItem}</f:format.raw>
index c67011b..946c809 100644 (file)
@@ -250,16 +250,19 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
                        }
                }
 
-               $output = '<table id="langTable" class="t3-table">' .
-                       '<thead>' .
-                               '<tr>' .
-                                       implode('', $tCells) .
-                               '</tr>' .
-                               '</thead>' .
-                               '<tbody>' .
-                                       $output .
-                               '</tbody>' .
-                       '</table>';
+               $output =
+                       '<div class="table-fit">' .
+                               '<table id="langTable" class="t3-table">' .
+                                       '<thead>' .
+                                               '<tr>' .
+                                                       implode('', $tCells) .
+                                               '</tr>' .
+                                       '</thead>' .
+                                       '<tbody>' .
+                                               $output .
+                                       '</tbody>' .
+                               '</table>' .
+                       '</div>';
                return $output;
        }
 
index f9b247d..1e60b9f 100644 (file)
@@ -121,7 +121,7 @@ class TemplateAnalyzerModuleFunctionController extends \TYPO3\CMS\Backend\Module
                $head .= '<th>' . $GLOBALS['LANG']->getLL('nextLevel', TRUE) . '</th>';
                $head .= '</tr></thead>';
                $hierar = implode(array_reverse($GLOBALS['tmpl']->ext_getTemplateHierarchyArr($hierarchyInfo, '', array(), 1)), '');
-               $hierar = '<table class="t3-table" id="ts-analyzer">' . $head . $hierar . '</table>';
+               $hierar = '<div class="table-fit"><table class="t3-table" id="ts-analyzer">' . $head . $hierar . '</table></div>';
                $theOutput .= $this->pObj->doc->spacer(5);
                $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('templateHierarchy', TRUE), $hierar, 0, 1);
                $urlParameters = array(
index f7bf2d0..a63aa14 100644 (file)
@@ -267,7 +267,7 @@ class TypoScriptTemplateInformationModuleFunctionController extends AbstractFunc
                        $outCode .= $this->tableRow($lang->getLL('description'), nl2br(htmlspecialchars($tplRow['description'])), 'description', $tplRow['uid']);
                        $outCode .= $this->tableRow($lang->getLL('constants'), sprintf($lang->getLL('editToView'), trim($tplRow['constants']) ? count(explode(LF, $tplRow['constants'])) : 0), 'constants', $tplRow['uid']);
                        $outCode .= $this->tableRow($lang->getLL('setup'), sprintf($lang->getLL('editToView'), trim($tplRow['config']) ? count(explode(LF, $tplRow['config'])) : 0), 'config', $tplRow['uid']);
-                       $outCode = '<table class="t3-table">' . $outCode . '</table>';
+                       $outCode = '<div class="table-fit"><table class="t3-table">' . $outCode . '</table></div>';
 
                        // Edit all icon:
                        $editOnClick = BackendUtility::editOnClick(rawurlencode('&createExtension=0') . '&amp;edit[sys_template][' . $tplRow['uid'] . ']=edit', $GLOBALS['BACK_PATH'], '');
index fea0701..1e75e07 100644 (file)
@@ -191,7 +191,7 @@ class TypoScriptTemplateModuleController extends \TYPO3\CMS\Backend\Module\BaseS
                        }
                        $GLOBALS['TYPO3_DB']->sql_free_result($res);
 
-                       $table = '<table class="t3-table" id="ts-overview">' .
+                       $table = '<div class="table-fit"><table class="t3-table" id="ts-overview">' .
                                        '<thead>' .
                                        '<tr>' .
                                        '<th>' . $GLOBALS['LANG']->getLL('pageName') . '</th>' .
@@ -201,7 +201,7 @@ class TypoScriptTemplateModuleController extends \TYPO3\CMS\Backend\Module\BaseS
                                        '</tr>' .
                                        '</thead>' .
                                        '<tbody>' . implode('', $this->renderList($pArray)) . '</tbody>' .
-                                       '</table>';
+                                       '</table></div>';
 
                        $this->content = $this->doc->header($GLOBALS['LANG']->getLL('moduleTitle'));
                        $this->content .= $this->doc->section('', '<p class="lead">' . $GLOBALS['LANG']->getLL('overview') . '</p>' . $table);
index 811b315..5d03f84 100644 (file)
@@ -127,7 +127,7 @@ class CreatePagesWizardModuleFunctionController extends \TYPO3\CMS\Backend\Modul
                                for ($a = 0; $a < 9; $a++) {
                                        $tableData[] = $this->getFormLine($a);
                                }
-                               $lines[] = '<table id="formFieldContainer" class="t3-table"><tbody id="formFieldContainerBody">' . implode(LF, $tableData) . '</tbody></table>';
+                               $lines[] = '<div class="table-fit"><table id="formFieldContainer" class="t3-table"><tbody id="formFieldContainerBody">' . implode(LF, $tableData) . '</tbody></table></div>';
                                $theCode .= '<h4>' . $GLOBALS['LANG']->getLL('wiz_newPages') . ':</h4>' . implode('', $lines) . '<br class="clearLeft" />' . '<input type="button" id="createNewFormFields" value="' . $GLOBALS['LANG']->getLL('wiz_newPages_addMoreLines') . '" />' . '<br /><br />';
                                $theCode .= '<div class="checkbox"><label for="createInListEnd"><input type="checkbox" name="createInListEnd" id="createInListEnd" value="1" />' . $GLOBALS['LANG']->getLL('wiz_newPages_listEnd') . '</label></div>';
                                $theCode .= '<div class="checkbox"><label for="hidePages"><input type="checkbox" name="hidePages" id="hidePages" value="1" />' . $GLOBALS['LANG']->getLL('wiz_newPages_hidePages') . '</label></div>';
index ff9a8c8..6473466 100644 (file)
@@ -80,7 +80,7 @@ class SortPagesWizardModuleFunction extends \TYPO3\CMS\Backend\Module\AbstractFu
                                        </tr>';
                                }
                                $theCode .= '<h2>' . $GLOBALS['LANG']->getLL('wiz_currentPageOrder', TRUE) . '</h2>';
-                               $theCode .= '<table class="t3-table">' . implode('', $lines) . '</table>';
+                               $theCode .= '<div class="table-fit"><table class="t3-table">' . implode('', $lines) . '</table></div>';
 
                                // Menu:
                                $lines = array();