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

fixed a bug where search would not work anymore; fixed search clear button

parent 656b6f82
Branches
Tags
No related merge requests found
<mat-dialog-content>
<mat-card>
<mat-slide-toggle [(ngModel)]="considerVotes">{{'topic-cloud-dialog.consider-Votes' | translate}}</mat-slide-toggle>
<mat-slide-toggle [(ngModel)]="considerVotes">{{'topic-cloud-dialog.consider-votes' | translate}}</mat-slide-toggle>
<mat-slide-toggle [(ngModel)]="tagsLowerCase">{{'topic-cloud-dialog.tags-lowercase' | translate}}</mat-slide-toggle>
</mat-card>
......@@ -13,7 +13,7 @@
<input #searchBox id="searchBox" (input)="searchKeyword()"
[(ngModel)]="searchedKeyword" matInput type="text"
placeholder="{{'topic-cloud-dialog.keyword-search' | translate}}">
<button *ngIf="searchedKeyword !== ''"
<button *ngIf="searchedKeyword"
(click)="searchedKeyword = ''; searchMode = false;"
mat-button matSuffix mat-icon-button aria-label="topic-cloud-dialog.keyword-search">
<mat-icon>close</mat-icon>
......@@ -40,7 +40,7 @@
<mat-expansion-panel hideToggle *ngIf="searchMode && filteredKeywords.length === 0">
<mat-expansion-panel-header>
<mat-panel-title fxLayoutAlign="center">
{{'topic-cloud-dialog.no-Keywords-note' | translate}}
{{'topic-cloud-dialog.no-keywords-note' | translate}}
</mat-panel-title>
</mat-expansion-panel-header>
</mat-expansion-panel>
......@@ -84,7 +84,7 @@
<mat-divider></mat-divider>
<mat-form-field>
<mat-label>{{'topic-cloud-dialog.edit-keyword-tipp' | translate}}</mat-label>
<mat-label>{{'topic-cloud-dialog.edit-keyword-tip' | translate}}</mat-label>
<input matInput id="{{'edit-input'+i}}" [(ngModel)]="newKeyword">
</mat-form-field>
<!-- TODO: textinput and buttons in one row -->
......@@ -95,4 +95,4 @@
</div>
</mat-expansion-panel>
</mat-accordion>
</mat-dialog-content>
\ No newline at end of file
</mat-dialog-content>
......@@ -178,8 +178,8 @@ export class TopicCloudAdministrationComponent implements OnInit {
});
}
searchKeyword(): void{
if (this.searchedKeyword){
searchKeyword(): void {
if (!this.searchedKeyword){
this.searchMode = false;
} else {
this.filteredKeywords = this.keywords.filter(keyword =>
......
<h2 mat-dialog-title>{{'topic-cloud-confirm-dialog.confirm' | translate}} "{{data.topic}}"?</h2>
<h2 mat-dialog-title>{{'topic-cloud-confirm-dialog.confirm' | translate}}</h2>
<mat-divider></mat-divider>
<p>{{'topic-cloud-confirm-dialog.will-be-deleted' | translate }} '{{data.topic}}'.</p>
<div mat-dialog-actions align="end">
<button class="primary" mat-raised-button [mat-dialog-close]="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