Use board-global card registry to handle focus

This also disabled selections
pull/8230/head
Oliver Günther 5 years ago
parent b33faeea7c
commit 8d0ecb4b3e
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 6
      frontend/src/app/components/wp-card-view/wp-card-view.component.ts
  2. 7
      frontend/src/app/modules/boards/board/board-partitioned-page/board-partitioned-page.component.ts

@ -147,7 +147,11 @@ export class WorkPackageCardViewComponent extends UntilDestroyedMixin implements
// Register event handlers for the cards
let registry = this.injector.get<any>(WorkPackageViewHandlerToken, CardViewHandlerRegistry);
new registry(this.injector).attachTo(this);
if (registry instanceof CardViewHandlerRegistry) {
registry.attachTo(this);
} else {
new registry(this.injector).attachTo(this);
}
this.wpTableSelection.registerSelectAllListener(() => {
return this.cardView.renderedCards;
});

@ -24,6 +24,12 @@ import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixi
import {QueryResource} from "core-app/modules/hal/resources/query-resource";
import {Ng2StateDeclaration} from "@uirouter/angular";
import {BoardFiltersService} from "core-app/modules/boards/board/board-filter/board-filters.service";
import {WorkPackageViewHandlerToken} from "core-app/modules/work_packages/routing/wp-view-base/event-handling/event-handler-registry";
import {CardViewHandlerRegistry} from "core-components/wp-card-view/event-handler/card-view-handler-registry";
export function boardCardViewHandlerFactory(injector:Injector) {
return new CardViewHandlerRegistry(injector);
}
@Component({
templateUrl: '/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.html',
@ -34,6 +40,7 @@ import {BoardFiltersService} from "core-app/modules/boards/board/board-filter/bo
providers: [
DragAndDropService,
BoardFiltersService,
{ provide: WorkPackageViewHandlerToken, useFactory: boardCardViewHandlerFactory, deps: [Injector] },
]
})
export class BoardPartitionedPageComponent extends UntilDestroyedMixin {

Loading…
Cancel
Save