Fix height of header and padding

pull/5094/head
Oliver Günther 8 years ago
parent 4049682df7
commit 9a51173f7e
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 9
      app/assets/stylesheets/content/work_packages/timelines/_timelines.sass
  2. 12
      frontend/app/components/wp-table/timeline/wp-timeline.header.ts

@ -1,4 +1,11 @@
.wp-timeline--dummy-controls .wp-timeline--dummy-controls
padding: 0.625rem padding: 0.625rem
background-color: #F8F8F8 background-color: #F8F8F8
border: 1px solid #EAEAEA border: 1px solid #EAEAEA
table.generic-table
.generic-table--sort-header-outer.wp-timeline--header
padding: 0
margin-left: -2px
border-left: 2px solid $primary-color-dark

@ -36,7 +36,7 @@ import {
import {todayLine} from "./wp-timeline.today-line"; import {todayLine} from "./wp-timeline.today-line";
import Moment = moment.Moment; import Moment = moment.Moment;
const cssClassTableBody = ".work-package-table"; const cssClassTableBody = ".work-package-table tbody";
const cssClassHeader = ".wp-timeline-header"; const cssClassHeader = ".wp-timeline-header";
export type GlobalElement = (viewParams: TimelineViewParameters, elem: HTMLElement) => any; export type GlobalElement = (viewParams: TimelineViewParameters, elem: HTMLElement) => any;
@ -52,6 +52,10 @@ export class WpTimelineHeader {
private marginTop: number; private marginTop: number;
/** Height of the header elements */
private headerHeight = 45;
/** Height of the table body + table header */
private globalHeight: number; private globalHeight: number;
private activeZoomLevel: ZoomLevel; private activeZoomLevel: ZoomLevel;
@ -80,9 +84,9 @@ export class WpTimelineHeader {
this.headerCell = jQuery(cssClassHeader)[0]; this.headerCell = jQuery(cssClassHeader)[0];
} }
this.headerCell.style.height = jQuery(cssClassTableBody).outerHeight() + 'px'; this.globalHeight = jQuery(cssClassTableBody).outerHeight() + this.headerHeight;
this.marginTop = 45; this.marginTop = this.headerHeight;
this.globalHeight = jQuery(cssClassTableBody).outerHeight(); this.headerCell.style.height = this.globalHeight + 'px';
} }
private renderLabels(vp: TimelineViewParameters) { private renderLabels(vp: TimelineViewParameters) {

Loading…
Cancel
Save