Fix resizer from table showing in embedded table

pull/6242/head
Oliver Günther 7 years ago
parent 7f747b51df
commit ab8b7c8730
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 9
      frontend/app/components/wp-table/wp-table-configuration.ts
  2. 9
      frontend/app/components/wp-table/wp-table.directive.html
  3. 12
      frontend/app/components/wp-table/wp-table.directive.ts

@ -35,6 +35,9 @@ export class WorkPackageTableConfiguration {
public columnMenuEnabled:boolean = true;
public projectContext:boolean = true;
public inlineCreateEnabled:boolean = true;
public hierarchyToggleEnabled:boolean = true;
public isEmbedded:boolean = false;
constructor(private providedConfig:WorkPackageTableConfigurationObject) {
_.each(providedConfig, (value, k) => {
@ -43,9 +46,3 @@ export class WorkPackageTableConfiguration {
});
}
}
let foo:WorkPackageTableConfigurationObject = {
actionsColumnEnabled: true,
columnMenuEnabled: false
};

@ -24,14 +24,14 @@
</sortHeader>
</th>
<th class="wp-table--context-menu-column -short hide-when-print"
*ngIf="columnMenuEnabled || actionsColumnEnabled">
*ngIf="configuration.columnMenuEnabled || configuration.actionsColumnEnabled">
<div class="generic-table--sort-header-outer">
<accessible-by-keyboard
(execute)="openColumnsModal()"
linkClass="wp-table--columns-selection"
linkTitle="{{text.addColumns}}"
linkAriaLabel="{{text.addColumns}}"
*ngIf="columnMenuEnabled">
*ngIf="configuration.columnMenuEnabled">
<op-icon icon-classes="icon-button icon-small icon-add"></op-icon>
</accessible-by-keyboard>
</div>
@ -56,7 +56,7 @@
</tbody>
<tbody class="results-tbody work-package--results-tbody">
</tbody>
<tbody *ngIf="tableElement && inlineCreateEnabled"
<tbody *ngIf="tableElement && configuration.inlineCreateEnabled"
wpInlineCreate
[wp-inline-create--table]="workPackageTable"
[wp-inline-create--project-identifier]="projectIdentifier"
@ -68,7 +68,8 @@
</table>
</div>
<div class="work-packages--tabletimeline--timeline--resizer hidden-for-mobile hide-when-print">
<div *ngIf="!configuration.isEmbedded"
class="work-packages--tabletimeline--timeline--resizer hidden-for-mobile hide-when-print">
<wp-resizer [elementClass]="'work-packages-tabletimeline--timeline-side'"
[resizeEvent]="'wp-resize.timeline'"
[localStorageKey]="'openProject-timelineFlexBasis'"></wp-resizer>

@ -185,18 +185,6 @@ export class WorkPackagesTableController implements OnInit, OnDestroy {
this.columnsModal.activate();
}
public get columnMenuEnabled() {
return this.configuration.columnMenuEnabled;
}
public get actionsColumnEnabled() {
return this.configuration.actionsColumnEnabled;
}
public get inlineCreateEnabled() {
return this.configuration.inlineCreateEnabled;
}
private getTableAndTimelineElement():[HTMLElement, HTMLElement] {
const $tableSide = this.$element.find('.work-packages-tabletimeline--table-side');
const $timelineSide = this.$element.find('.work-packages-tabletimeline--timeline-side');

Loading…
Cancel
Save