From 60288065bc62dc79d5b857e327dd5d9674317f04 Mon Sep 17 00:00:00 2001 From: Magdalena Kafka Date: Mon, 2 Nov 2015 13:58:39 +0100 Subject: [PATCH] Expand generic tables to 100%; remove hack to hide horizontal scrollbar --- app/assets/stylesheets/content/_table.sass | 9 ++++++--- app/assets/stylesheets/layout/_toolbar.sass | 3 +++ app/assets/stylesheets/layout/_work_package.sass | 5 ----- .../app/ui_components/interactive-table-directive.js | 9 +-------- 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/app/assets/stylesheets/content/_table.sass b/app/assets/stylesheets/content/_table.sass index 428c164c44..a38587d47c 100644 --- a/app/assets/stylesheets/content/_table.sass +++ b/app/assets/stylesheets/content/_table.sass @@ -205,15 +205,18 @@ table.generic-table white-space: nowrap width: 100% clear: both - display: table + display: block & > a, & > span - display: table-cell + display: block font-weight: bold overflow: hidden text-overflow: ellipsis - max-width: 0px + + & > a + float: left + width: calc(100% - 18px) & > .dropdown-indicator width: 1em diff --git a/app/assets/stylesheets/layout/_toolbar.sass b/app/assets/stylesheets/layout/_toolbar.sass index b48a48cd83..e4a2739357 100644 --- a/app/assets/stylesheets/layout/_toolbar.sass +++ b/app/assets/stylesheets/layout/_toolbar.sass @@ -40,6 +40,9 @@ margin: 0.625rem 0 0 @extend %input--sizing +.toolbar + padding: 0 10px 0 0 + .toolbar-container padding: 0 margin-bottom: 12px diff --git a/app/assets/stylesheets/layout/_work_package.sass b/app/assets/stylesheets/layout/_work_package.sass index 88ef3f8a66..358c40385a 100644 --- a/app/assets/stylesheets/layout/_work_package.sass +++ b/app/assets/stylesheets/layout/_work_package.sass @@ -253,11 +253,6 @@ .form--field-container max-width: 400px -.work-package-table--container - table.generic-table - // HACK: This prevents a horizontal scroll bar in the work package table when there is nothing to scroll - width: calc(100% - 20px) - %flex-grow-shrink-zero flex-grow: 0 flex-shrink: 0 diff --git a/frontend/app/ui_components/interactive-table-directive.js b/frontend/app/ui_components/interactive-table-directive.js index 3d4a368c50..8050ffb521 100644 --- a/frontend/app/ui_components/interactive-table-directive.js +++ b/frontend/app/ui_components/interactive-table-directive.js @@ -80,14 +80,7 @@ module.exports = function($timeout, $window){ } else { // ensure table stretches to container sizes getInnerContainer().css('width', '100%'); - if(isWorkPackagesTable()) { - // HACK: This prevents a horizontal scroll bar in - // the work package table when there is nothing to scroll - getBackgrounds().css('width', 'calc(100% - 20px)'); - } - else { - getBackgrounds().css('width', '100%'); - } + getBackgrounds().css('width', '100%'); } }