|
|
|
@ -26,7 +26,14 @@ |
|
|
|
|
// See docs/COPYRIGHT.rdoc for more details.
|
|
|
|
|
// ++
|
|
|
|
|
|
|
|
|
|
import {ChangeDetectionStrategy, ChangeDetectorRef, Component, Injector, OnInit} from "@angular/core"; |
|
|
|
|
import { |
|
|
|
|
ChangeDetectionStrategy, |
|
|
|
|
ChangeDetectorRef, |
|
|
|
|
Component, |
|
|
|
|
Injector, |
|
|
|
|
OnInit, |
|
|
|
|
ElementRef |
|
|
|
|
} from "@angular/core"; |
|
|
|
|
import {take} from "rxjs/operators"; |
|
|
|
|
import {CausedUpdatesService} from "core-app/modules/boards/board/caused-updates/caused-updates.service"; |
|
|
|
|
import {DragAndDropService} from "core-app/modules/common/drag-and-drop/drag-and-drop.service"; |
|
|
|
@ -89,7 +96,8 @@ export class WorkPackageListViewComponent extends UntilDestroyedMixin implements |
|
|
|
|
readonly deviceService:DeviceService, |
|
|
|
|
readonly CurrentProject:CurrentProjectService, |
|
|
|
|
readonly wpDisplayRepresentation:WorkPackageViewDisplayRepresentationService, |
|
|
|
|
readonly cdRef:ChangeDetectorRef) { |
|
|
|
|
readonly cdRef:ChangeDetectorRef, |
|
|
|
|
readonly elementRef:ElementRef) { |
|
|
|
|
super(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -105,6 +113,15 @@ export class WorkPackageListViewComponent extends UntilDestroyedMixin implements |
|
|
|
|
this.noResults = query.results.total === 0; |
|
|
|
|
this.cdRef.detectChanges(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// Scroll into view the card/row that represents the last selected WorkPackage
|
|
|
|
|
// so when the user clicks a WP from a wp-split-view-entry (list of wp) and then
|
|
|
|
|
// clicks on the 'back button', the last selected card is visible on this list.
|
|
|
|
|
const selectedElement = this.elementRef.nativeElement.querySelector('.-checked'); |
|
|
|
|
|
|
|
|
|
if (selectedElement) { |
|
|
|
|
this.elementRef.nativeElement.scrollIntoView({block: "start"}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected setupInformationLoadedListener() { |
|
|
|
@ -119,7 +136,7 @@ export class WorkPackageListViewComponent extends UntilDestroyedMixin implements |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected showResizerInCardView():boolean { |
|
|
|
|
public showResizerInCardView():boolean { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|