OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/frontend/app/components/wp-fast-table/handlers/state/timeline-transformer.ts

26 lines
865 B

import { WorkPackageTableTimelineVisible } from './../../wp-table-timeline-visible';
import {States} from "../../../states.service";
import {injectorBridge} from "../../../angular/angular-injector-bridge.functions";
import {WorkPackageTable} from "../../wp-fast-table";
export class TimelineTransformer {
public states:States;
constructor(table:WorkPackageTable) {
injectorBridge(this);
this.states.table.timelineVisible.values$()
.takeUntil(this.states.table.stopAllSubscriptions).subscribe((state:WorkPackageTableTimelineVisible) => {
this.renderVisibility(state.isVisible);
});
}
/**
* Update all currently visible rows to match the selection state.
*/
private renderVisibility(visible:boolean) {
jQuery('.work-packages-split-view--left-timeline').toggle(visible);
}
}
TimelineTransformer.$inject = ['states'];