This avoids horizontal scrollbars when they were not needed.

pull/3447/head
Henriette Dinger 9 years ago
parent ddb610b634
commit 6aa6613202
  1. 3
      app/assets/stylesheets/layout/_work_package.sass
  2. 13
      frontend/app/ui_components/interactive-table-directive.js

@ -234,6 +234,9 @@
.form--field-container
max-width: 400px
.work-package-table--container
table.generic-table
width: calc(100% - 10px)
%flex-grow-shrink-zero
flex-grow: 0

@ -44,7 +44,11 @@ module.exports = function($timeout, $window){
}
function getOuterContainer() {
return element.parent('.generic-table--container');
return element.closest('.generic-table--container');
}
function isWorkPackagesTable () {
return element.closest('.work-package-table--container').length !== 0;
}
function getBackgrounds() {
@ -76,7 +80,12 @@ module.exports = function($timeout, $window){
} else {
// ensure table stretches to container sizes
getInnerContainer().css('width', '100%');
getBackgrounds().css('width', '100%');
if(isWorkPackagesTable()) {
getBackgrounds().css('width', 'calc(100% - 10px)');
}
else {
getBackgrounds().css('width', '100%');
}
}
}

Loading…
Cancel
Save