15e9ea898b
Replaces most mat-tables with tables using the NGrid library, supporting extremly performant virtual scrolling. The ListViewBaseComponent have been extremly simplified. All list-view code is now mich shorter and way less repitative The group list and the workflow list have not been altered. **Works:** - Fast virtual Scrolling without pagination - Click Filter - Search Filter - Sorting - Export filtered values (using click filters) - Export sorted values in correct order - Right-Click-new-tab - Hiding/showing columns by permission and screen size - Multi select - Auto Updates in MultiSelectMode keep the correct items selected - OsHeadBar shows the correct amount of data - Restore scroll position after navigation - Shared-Table Component - Clean-Up base-list-view - Motion List - Motion Block List - Motion Block Detail - User List - Agnnda List - Assignment List - MediaFile List - Tag List **TODO:** - Formulate filter predicates - LOS Badge autoupdate (change detection) - Better ellipses in lists - Horrizontal Scrolling, if the screen get's too small. - Issues in the change detection - Some Layouting **BUG:** - Using the seach filter prevents the sorting from working. - NGrid currently has no way to get the filtered list using search filter. Thus, search-filtered list cannot be exported.
52 lines
1.7 KiB
TypeScript
52 lines
1.7 KiB
TypeScript
import { Component, Input } from '@angular/core';
|
|
|
|
import { ContentObject, isContentObject } from 'app/shared/models/base/content-object';
|
|
import { ViewListOfSpeakers } from 'app/site/agenda/models/view-list-of-speakers';
|
|
import {
|
|
BaseViewModelWithListOfSpeakers,
|
|
isBaseViewModelWithListOfSpeakers
|
|
} from 'app/site/base/base-view-model-with-list-of-speakers';
|
|
import { ListOfSpeakersRepositoryService } from 'app/core/repositories/agenda/list-of-speakers-repository.service';
|
|
|
|
/**
|
|
* A generic button to go to the list of speakers. Give the content object with
|
|
* [object]=object, which can be a ContentObject or a ViewModelWithListOfSpeakers.
|
|
* - Usage as a mini-fab (like in the agenda) with [menuItem]=false (default)
|
|
* - Usage in a dropdown (=list) with [menuItem]=true
|
|
*/
|
|
@Component({
|
|
selector: 'os-speaker-button',
|
|
templateUrl: './speaker-button.component.html'
|
|
})
|
|
export class SpeakerButtonComponent {
|
|
@Input()
|
|
public set object(obj: BaseViewModelWithListOfSpeakers | ContentObject | null) {
|
|
if (isBaseViewModelWithListOfSpeakers(obj)) {
|
|
this.listOfSpeakers = obj.listOfSpeakers;
|
|
} else if (isContentObject(obj)) {
|
|
this.listOfSpeakers = this.listOfSpeakersRepo.findByContentObject(obj);
|
|
} else {
|
|
this.listOfSpeakers = null;
|
|
}
|
|
}
|
|
|
|
public listOfSpeakers: ViewListOfSpeakers | null;
|
|
|
|
@Input()
|
|
public disabled: boolean;
|
|
|
|
@Input()
|
|
public menuItem = false;
|
|
|
|
public get listOfSpeakersUrl(): string {
|
|
if (!this.disabled) {
|
|
return this.listOfSpeakers.listOfSpeakersUrl;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* The constructor
|
|
*/
|
|
public constructor(private listOfSpeakersRepo: ListOfSpeakersRepositoryService) {}
|
|
}
|