Skip to content
Snippets Groups Projects
Commit cc8ca29e authored by Stefan Plociennik's avatar Stefan Plociennik
Browse files

adds checkbox to select all spacy labels

parent 2596ce4d
Branches
Tags
No related merge requests found
......@@ -119,10 +119,11 @@
<mat-selection-list *ngIf="wantedLabels" [(ngModel)]="wantedLabels.de">
<mat-option class="color-on-surface" (click)="selectAllDE()">
<mat-label>
<mat-label class="color-on-surface">
<mat-icon>playlist_add_check</mat-icon>
{{'topic-cloud-dialog.select-all' | translate}}
</mat-label>
<mat-checkbox style="vertical-align: middle;float: right;" [checked]="this.wantedLabels.de.length===this.spacyLabels.de.length"></mat-checkbox>
</mat-option>
<mat-list-option [value]="label.tag" class="color-on-surface" *ngFor="let label of spacyLabels.de">
......@@ -134,10 +135,11 @@
<mat-selection-list *ngIf="wantedLabels" [(ngModel)]="wantedLabels.en">
<mat-option class="color-on-surface" (click)="selectAllEN()">
<mat-label>
<mat-label class="color-on-surface">
<mat-icon>playlist_add_check</mat-icon>
{{'topic-cloud-dialog.select-all' | translate}}
</mat-label>
<mat-checkbox style="vertical-align: middle;float: right;" [checked]="this.wantedLabels.en.length===this.spacyLabels.en.length"></mat-checkbox>
</mat-option>
<mat-list-option [value]="label.tag" class="color-on-surface" *ngFor="let label of spacyLabels.en">
......
......@@ -49,6 +49,7 @@ export class TopicCloudAdministrationComponent implements OnInit, OnDestroy {
de: string[];
en: string[];
};
spacyLabelsAllSelectedDE = true;
keywords: Keyword[] = [];
private topicCloudAdminData: TopicCloudAdminData;
......@@ -364,8 +365,10 @@ export class TopicCloudAdministrationComponent implements OnInit, OnDestroy {
this.spacyLabels.de.forEach(label => {
this.wantedLabels.de.push(label.tag);
});
this.spacyLabelsAllSelectedDE = true;
} else {
this.wantedLabels.de = [];
this.spacyLabelsAllSelectedDE = false;
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment