From f6b0ac03938d7fa18810e99c39f93a36cb5bb33d Mon Sep 17 00:00:00 2001 From: Benjamin Kott <benjamin.kott@wfp2.com> Date: Mon, 24 Nov 2014 13:28:10 +0100 Subject: [PATCH] [TASK] Correct table rendering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add darker panel header to remain visual identity * add nowrap for th in typo3 tables * remove obsolete db_list_normal class and definitions * remove obsolete pagination styling from beusers * fix padding list module table styling * fix beuser table listing Resolves: #63294 Releases: master Change-Id: I57170021f322751192618fa0a83e2a16dc855a74 Reviewed-on: http://review.typo3.org/34544 Reviewed-by: Felix Kopp <felix-source@phorax.com> Tested-by: Felix Kopp <felix-source@phorax.com> Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl> Tested-by: Wouter Wolters <typo3@wouterwolters.nl> Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de> Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de> Reviewed-by: Frank Nägler <typo3@naegler.net> Tested-by: Frank Nägler <typo3@naegler.net> --- .../ElementInformationController.php | 4 +-- .../backend/Classes/View/PageLayoutView.php | 2 +- .../Partials/BackendUser/IndexListRow.html | 10 +++--- .../Partials/BackendUser/OnlineListRow.html | 2 +- .../Private/Templates/BackendUser/Index.html | 11 +++--- .../beuser/Resources/Public/Css/style.css | 23 ------------ .../Private/Templates/mod_template.html | 4 +-- .../Private/Styles/TYPO3/_element_panel.less | 5 ++- .../Private/Styles/TYPO3/_element_table.less | 34 ++++++++++-------- .../TYPO3/structure/_module_web_list.less | 6 ---- .../Private/Styles/bootstrap/variables.less | 4 +-- .../Resources/Public/Css/visual/t3skin.css | 36 +++++++++---------- .../View/SortPagesWizardModuleFunction.php | 2 +- 13 files changed, 55 insertions(+), 88 deletions(-) diff --git a/typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php b/typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php index f02baa731cb0..94cd94c8b194 100644 --- a/typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php +++ b/typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php @@ -544,7 +544,7 @@ class ElementInformationController { $record = BackendUtility::getRecord($row['tablename'], $row['recuid']); $parentRecord = BackendUtility::getRecord('pages', $record['pid']); $actions = $this->getRecordActions($row['tablename'], $row['recuid']); - $infoData[] = '<tr class="db_list_normal">' . + $infoData[] = '<tr>' . '<td style="white-space:nowrap;">' . $actions . '</td>' . '<td>' . $GLOBALS['LANG']->sL($GLOBALS['TCA'][$row['tablename']]['ctrl']['title'], TRUE) . '</td>' . '<td>' . BackendUtility::getRecordTitle($row['tablename'], $record, TRUE) . '</td>' . @@ -597,7 +597,7 @@ class ElementInformationController { } foreach ($rows as $row) { $actions = $this->getRecordActions($row['ref_table'], $row['ref_uid']); - $infoData[] = '<tr class="db_list_normal">' . + $infoData[] = '<tr>' . '<td style="white-space:nowrap;">' . $actions . '</td>' . '<td>' . htmlspecialchars($this->getLabelForTableColumn($table, $row['field'])) . '</td>' . '<td>' . htmlspecialchars($row['flexpointer']) . '</td>' . diff --git a/typo3/sysext/backend/Classes/View/PageLayoutView.php b/typo3/sysext/backend/Classes/View/PageLayoutView.php index 21625e7b1f4e..8c89b0663526 100644 --- a/typo3/sysext/backend/Classes/View/PageLayoutView.php +++ b/typo3/sysext/backend/Classes/View/PageLayoutView.php @@ -995,7 +995,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe } else { $Nrow['__editIconLink__'] = $this->noEditIcon(); } - $out .= $this->addelement(1, '', $Nrow, 'class="db_list_normal"'); + $out .= $this->addelement(1, '', $Nrow); } $this->eCounter++; } diff --git a/typo3/sysext/beuser/Resources/Private/Partials/BackendUser/IndexListRow.html b/typo3/sysext/beuser/Resources/Private/Partials/BackendUser/IndexListRow.html index cb1fef77cd14..d025be13a921 100644 --- a/typo3/sysext/beuser/Resources/Private/Partials/BackendUser/IndexListRow.html +++ b/typo3/sysext/beuser/Resources/Private/Partials/BackendUser/IndexListRow.html @@ -1,21 +1,19 @@ {namespace bu = TYPO3\CMS\Beuser\ViewHelpers} -<tr class="db_list_normal"> +<tr> <td class="col-icon"> <a href="#" class="t3-js-clickmenutrigger" data-table="be_users" data-uid="{backendUser.uid}" data-listframe="1" title="id={backendUser.uid}"> <bu:spriteIconForRecord table="be_users" object="{backendUser}" /> </a> </td> - <td class="t3-title-column"> + <td class="col-title"> <a href="alt_doc.php?edit[be_users][{backendUser.uid}]=edit&returnUrl={returnUrl}"> <b>{backendUser.userName}</b><br /> {backendUser.realName} </a> </td> - <td> - <f:link.action action="addToCompareList" arguments="{uid: backendUser.uid}" class="btn"><bu:spriteManagerIcon iconName="actions-edit-add"/> <f:translate key="compare" /></f:link.action> - </td> <td class="col-control"> + <f:link.action action="addToCompareList" arguments="{uid: backendUser.uid}" class="btn"><bu:spriteManagerIcon iconName="actions-edit-add"/> <f:translate key="compare" /></f:link.action> <div class="btn-group" role="group"> <a class="btn" href="#" onclick="top.launchView('be_users', '{backendUser.uid}'); return false;"><bu:spriteManagerIcon iconName="actions-document-info" /></a> <a class="btn" href="alt_doc.php?edit[be_users][{backendUser.uid}]=edit&returnUrl={returnUrl}"><bu:spriteManagerIcon iconName="actions-document-open" /></a> @@ -38,7 +36,7 @@ <bu:SwitchUser backendUser="{backendUser}" /> </div> </td> - <td class="hidden-xs hidden-sm"> + <td> <f:if condition="{backendUser.lastLoginDateAndTime}"> <f:then> <f:format.date format="{dateFormat} {timeFormat}">{backendUser.lastLoginDateAndTime}</f:format.date> diff --git a/typo3/sysext/beuser/Resources/Private/Partials/BackendUser/OnlineListRow.html b/typo3/sysext/beuser/Resources/Private/Partials/BackendUser/OnlineListRow.html index ded9bfe9a24c..b0e22ff31f5c 100644 --- a/typo3/sysext/beuser/Resources/Private/Partials/BackendUser/OnlineListRow.html +++ b/typo3/sysext/beuser/Resources/Private/Partials/BackendUser/OnlineListRow.html @@ -1,7 +1,7 @@ {namespace bu = TYPO3\CMS\Beuser\ViewHelpers} <f:for each="{onlineUser.sessions}" as="session" iteration="it"> - <tr class="db_list_normal"> + <tr> <f:if condition="{it.isFirst}"> <f:then> <td> diff --git a/typo3/sysext/beuser/Resources/Private/Templates/BackendUser/Index.html b/typo3/sysext/beuser/Resources/Private/Templates/BackendUser/Index.html index ef46a1e4e238..742e67d19eb7 100644 --- a/typo3/sysext/beuser/Resources/Private/Templates/BackendUser/Index.html +++ b/typo3/sysext/beuser/Resources/Private/Templates/BackendUser/Index.html @@ -54,11 +54,10 @@ <table class="t3-table"> <thead> <tr> - <th> </th> - <th><f:translate key="userName" /> / <f:translate key="realName" /></th> - <th> </th> - <th> </th> - <th class="hidden-xs hidden-sm"><f:translate key="lastLogin" /></th> + <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> @@ -69,7 +68,7 @@ Footer row: no officially defined style yet </f:comment> <tr> - <td colspan="6"> + <td colspan="4"> <f:count subject="{backendUsers}" /> <f:translate key="users" /> </td> </tr> diff --git a/typo3/sysext/beuser/Resources/Public/Css/style.css b/typo3/sysext/beuser/Resources/Public/Css/style.css index 753f7e94bb5b..f7502b1b55c3 100644 --- a/typo3/sysext/beuser/Resources/Public/Css/style.css +++ b/typo3/sysext/beuser/Resources/Public/Css/style.css @@ -24,29 +24,6 @@ div.collapsibleSection { background-color: #ededed; border-top: 1px solid #cdcdc /** * @end */ - -/** - * @group: Paginate - */ - -.f3-widget-paginator { display: block; float: left; margin: 0 0 10px; } - - .f3-widget-paginator li { font-weight: bold; display: block; float: left; width: 30px; text-align: center; margin: 0 2px 2px; } - - .f3-widget-paginator li.current { border: 1px solid black; padding: 2px; } - - .f3-widget-paginator li.next, - .f3-widget-paginator li.previous { width: auto; } - - .f3-widget-paginator a { font-weight: normal; display: block; border: 1px solid black; padding: 2px; } - -/** - * @end - */ - .legend .pull-left { margin-right: 0.5em; } -.t3-table a { - cursor: pointer; -} diff --git a/typo3/sysext/linkvalidator/Resources/Private/Templates/mod_template.html b/typo3/sysext/linkvalidator/Resources/Private/Templates/mod_template.html index 4551263f910c..892d5785e798 100644 --- a/typo3/sysext/linkvalidator/Resources/Private/Templates/mod_template.html +++ b/typo3/sysext/linkvalidator/Resources/Private/Templates/mod_template.html @@ -21,7 +21,7 @@ <td class="number">###TOTAL_COUNT###</td> </tr> <!-- ###HOOK_SECTION### begin --> - <tr class="db_list_normal"> + <tr> <td> <div class="linkvalidator_singleOption">###OPTION###</div> </td> @@ -45,7 +45,7 @@ <td>###TABLEHEAD_LASTCHECK###</td> </tr> <!-- ###BROKENLINKS_ITEM### begin --> - <tr class="db_list_normal"> + <tr> <td>###ACTIONLINK###</td> <td>###PATH###</td> <td>###ELEMENT###</td> diff --git a/typo3/sysext/t3skin/Resources/Private/Styles/TYPO3/_element_panel.less b/typo3/sysext/t3skin/Resources/Private/Styles/TYPO3/_element_panel.less index a5b9ee13adb0..57eb0cd36471 100644 --- a/typo3/sysext/t3skin/Resources/Private/Styles/TYPO3/_element_panel.less +++ b/typo3/sysext/t3skin/Resources/Private/Styles/TYPO3/_element_panel.less @@ -13,12 +13,11 @@ .panel { margin: 3em 0; - .panel-heading { font-weight: bold; } - - .table { + .table, + .table-fit { border: 0; margin: 0; } diff --git a/typo3/sysext/t3skin/Resources/Private/Styles/TYPO3/_element_table.less b/typo3/sysext/t3skin/Resources/Private/Styles/TYPO3/_element_table.less index 90b0523761c8..82a53986ec52 100644 --- a/typo3/sysext/t3skin/Resources/Private/Styles/TYPO3/_element_table.less +++ b/typo3/sysext/t3skin/Resources/Private/Styles/TYPO3/_element_table.less @@ -65,13 +65,18 @@ table { box-sizing: border-box; } - > thead > tr > th, - > tbody > tr > th, - > tfoot > tr > th, - > thead > tr > td, - > tbody > tr > td, - > tfoot > tr > td { - vertical-align: middle; + > thead, + > tbody, + > tfoot { + > tr { + > th { + white-space: nowrap; + vertical-align: middle; + } + > td { + vertical-align: middle; + } + } } > thead > tr { @@ -214,7 +219,7 @@ table { } } - // .success + // .success > thead > tr, > tbody > tr, > tfoot > tr { @@ -318,13 +323,12 @@ table { margin-bottom: 0; border: 0; - > thead > tr > th, - > tbody > tr > th, - > tfoot > tr > th, - > thead > tr > td, - > tbody > tr > td, - > tfoot > tr > td { - white-space: nowrap; + > thead, + > tbody, + > tfoot { + > tr > td { + white-space: nowrap; + } } } } diff --git a/typo3/sysext/t3skin/Resources/Private/Styles/TYPO3/structure/_module_web_list.less b/typo3/sysext/t3skin/Resources/Private/Styles/TYPO3/structure/_module_web_list.less index 97b34c372df3..0266ac5f5c12 100644 --- a/typo3/sysext/t3skin/Resources/Private/Styles/TYPO3/structure/_module_web_list.less +++ b/typo3/sysext/t3skin/Resources/Private/Styles/TYPO3/structure/_module_web_list.less @@ -136,12 +136,6 @@ div#typo3-listOptions { margin: 0 0 24px 0; } -.db_list_normal td.col-control, -.db_list_normal td.col-clipboard { - padding-left: 3px; - padding-right: 0px; -} - .t3-list-table-header-icon-down { display: inline-block; height: 6px; diff --git a/typo3/sysext/t3skin/Resources/Private/Styles/bootstrap/variables.less b/typo3/sysext/t3skin/Resources/Private/Styles/bootstrap/variables.less index 7b6415c01dc2..e117bf513e21 100644 --- a/typo3/sysext/t3skin/Resources/Private/Styles/bootstrap/variables.less +++ b/typo3/sysext/t3skin/Resources/Private/Styles/bootstrap/variables.less @@ -703,8 +703,8 @@ @panel-footer-bg: #f5f5f5; @panel-default-text: @gray-dark; -@panel-default-border: #ddd; -@panel-default-heading-bg: #f5f5f5; +@panel-default-border: #ccc; +@panel-default-heading-bg: #ddd; @panel-primary-text: #fff; @panel-primary-border: @brand-primary; diff --git a/typo3/sysext/t3skin/Resources/Public/Css/visual/t3skin.css b/typo3/sysext/t3skin/Resources/Public/Css/visual/t3skin.css index ca68262d1c7a..0f437df0ceb4 100644 --- a/typo3/sysext/t3skin/Resources/Public/Css/visual/t3skin.css +++ b/typo3/sysext/t3skin/Resources/Public/Css/visual/t3skin.css @@ -4298,22 +4298,22 @@ a.list-group-item-danger.active:focus { border-bottom: 1px solid #dddddd; } .panel-default { - border-color: #dddddd; + border-color: #cccccc; } .panel-default > .panel-heading { color: #5a5a5a; - background-color: #f5f5f5; - border-color: #dddddd; + background-color: #dddddd; + border-color: #cccccc; } .panel-default > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #dddddd; + border-top-color: #cccccc; } .panel-default > .panel-heading .badge { - color: #f5f5f5; + color: #dddddd; background-color: #5a5a5a; } .panel-default > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #dddddd; + border-bottom-color: #cccccc; } .panel-primary { border-color: #0078e6; @@ -7969,7 +7969,10 @@ table { .t3-table > tbody > tr > th, .table > tbody > tr > th, .t3-table > tfoot > tr > th, -.table > tfoot > tr > th, +.table > tfoot > tr > th { + white-space: nowrap; + vertical-align: middle; +} .t3-table > thead > tr > td, .table > thead > tr > td, .t3-table > tbody > tr > td, @@ -8638,7 +8641,10 @@ fieldset[disabled] .table .btn-checkbox-holder input[type=checkbox]:checked + .b } .t3-table > thead > tr > th, .t3-table > tbody > tr > th, -.t3-table > tfoot > tr > th, +.t3-table > tfoot > tr > th { + white-space: nowrap; + vertical-align: middle; +} .t3-table > thead > tr > td, .t3-table > tbody > tr > td, .t3-table > tfoot > tr > td { @@ -9164,12 +9170,6 @@ fieldset[disabled] .t3-table .btn-checkbox-holder input[type=checkbox]:checked + margin-bottom: 0; border: 0; } -.table-fit > .table > thead > tr > th, -.table-fit > .t3-table > thead > tr > th, -.table-fit > .table > tbody > tr > th, -.table-fit > .t3-table > tbody > tr > th, -.table-fit > .table > tfoot > tr > th, -.table-fit > .t3-table > tfoot > tr > th, .table-fit > .table > thead > tr > td, .table-fit > .t3-table > thead > tr > td, .table-fit > .table > tbody > tr > td, @@ -9196,7 +9196,8 @@ fieldset[disabled] .t3-table .btn-checkbox-holder input[type=checkbox]:checked + .panel .panel-heading { font-weight: bold; } -.panel .table { +.panel .table, +.panel .table-fit { border: 0; margin: 0; } @@ -12006,11 +12007,6 @@ input.smallCheckboxes { div#typo3-listOptions { margin: 0 0 24px 0; } -.db_list_normal td.col-control, -.db_list_normal td.col-clipboard { - padding-left: 3px; - padding-right: 0px; -} .t3-list-table-header-icon-down { display: inline-block; height: 6px; diff --git a/typo3/sysext/wizard_sortpages/Classes/View/SortPagesWizardModuleFunction.php b/typo3/sysext/wizard_sortpages/Classes/View/SortPagesWizardModuleFunction.php index 21b3249605e5..ff9a8c853648 100644 --- a/typo3/sysext/wizard_sortpages/Classes/View/SortPagesWizardModuleFunction.php +++ b/typo3/sysext/wizard_sortpages/Classes/View/SortPagesWizardModuleFunction.php @@ -73,7 +73,7 @@ class SortPagesWizardModuleFunction extends \TYPO3\CMS\Backend\Module\AbstractFu $m_perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(2); // edit permissions for that page! $pRec = BackendUtility::getRecord('pages', $rec['uid'], 'uid', ' AND ' . $m_perms_clause); - $lines[] = '<tr class="db_list_normal"><td nowrap="nowrap">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', $rec) . (!is_array($pRec) ? '<strong class="text-danger">' . $GLOBALS['LANG']->getLL('wiz_W', TRUE) . '</strong></span> ' : '') . htmlspecialchars(GeneralUtility::fixed_lgd_cs($rec['title'], $GLOBALS['BE_USER']->uc['titleLen'])) . '</td> + $lines[] = '<tr><td nowrap="nowrap">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', $rec) . (!is_array($pRec) ? '<strong class="text-danger">' . $GLOBALS['LANG']->getLL('wiz_W', TRUE) . '</strong></span> ' : '') . htmlspecialchars(GeneralUtility::fixed_lgd_cs($rec['title'], $GLOBALS['BE_USER']->uc['titleLen'])) . '</td> <td nowrap="nowrap">' . htmlspecialchars(GeneralUtility::fixed_lgd_cs($rec['subtitle'], $GLOBALS['BE_USER']->uc['titleLen'])) . '</td> <td nowrap="nowrap">' . BackendUtility::datetime($rec['tstamp']) . '</td> <td nowrap="nowrap">' . BackendUtility::datetime($rec['crdate']) . '</td> -- GitLab