diff --git a/src/app/components/shared/comment-list/comment-list.component.html b/src/app/components/shared/comment-list/comment-list.component.html index 883b7e74c26f2ba52e8224d1cea91f7d2a607cd7..64683e4f7985c1b70ee126bc409ca2f377daea56 100644 --- a/src/app/components/shared/comment-list/comment-list.component.html +++ b/src/app/components/shared/comment-list/comment-list.component.html @@ -2,7 +2,7 @@ <mat-label fxLayoutAlign="center center"> <mat-icon class="search-icon">search</mat-icon> </mat-label> - <input #searchBox placeholder="{{ 'comment-list-page.search-box-placeholder-text' | translate }}" + <input #searchBox placeholder="{{ 'comment-list-page.search' | translate }}" (input)="searchComments(searchBox.value)"> <button mat-button *ngIf="searchBox.value || isIconHide" (click)="hideCommentsList=false; searchBox.value=''; isIconHide=false"> <mat-icon>close</mat-icon> @@ -17,7 +17,7 @@ </button> <mat-icon mat-icon-button *ngIf="!searchBox.value" class="add-filterIcon" color="accent" [matMenuTriggerFor]="filterMenu"> - filter_list + sort </mat-icon> <mat-menu #filterMenu="matMenu" xPosition="before"> @@ -50,8 +50,8 @@ </div> <mat-card id="outer-card" *ngIf="hideCommentsList"> - <app-comment *ngFor="let current of filteredComments" [comment]="current"> </app-comment> + <app-comment *ngFor="let current of filteredComments" [comment]="current"></app-comment> </mat-card> <mat-card *ngIf="!hideCommentsList"> - <app-comment *ngFor="let current of comments | orderBy: 'timestamp'" [comment]="current"> </app-comment> + <app-comment *ngFor="let current of comments | orderBy: 'timestamp'" [comment]="current"></app-comment> </mat-card> diff --git a/src/app/components/shared/comment-list/comment-list.component.ts b/src/app/components/shared/comment-list/comment-list.component.ts index d0ceeb76557729d651ec3b97a9455eeebb12e58c..e188ed0591d7e4e66f812e3f9a19f0b784c71f8a 100644 --- a/src/app/components/shared/comment-list/comment-list.component.ts +++ b/src/app/components/shared/comment-list/comment-list.component.ts @@ -57,7 +57,7 @@ export class CommentListComponent implements OnInit { } searchComments(term: string): void { - if (term) { + if (term && term.length > 2) { this.hideCommentsList = true; this.filteredComments = this.comments.filter(c => c.body.toLowerCase().includes(term.toLowerCase())); } else { diff --git a/src/app/components/shared/comment/comment.component.html b/src/app/components/shared/comment/comment.component.html index eff545cbdbef6908c6fb95031d513251d506d0a4..8b4c59b3f8c71dabc1879787d84244a3c127f2f4 100644 --- a/src/app/components/shared/comment/comment.component.html +++ b/src/app/components/shared/comment/comment.component.html @@ -22,7 +22,7 @@ </div> <div fxLayout="row"> <div class="body" (click)="openPresentDialog(comment)">{{comment.body}}</div> - <span class="fill-remaining-space"></span> + <span class="fill-remaining-space" (click)="openPresentDialog(comment)"></span> <div fxLayout="column" (tap)="startAnimation('rubberBand')" [@rubberBand]="animationState" (@rubberBand.done)="resetAnimationState()"> <button mat-icon-button [disabled]="!isStudent" (click)="voteUp(comment)" > <mat-icon class="voting-icon" [ngClass]="{'upvoted' : hasVoted === 1}">keyboard_arrow_up</mat-icon> diff --git a/src/assets/i18n/creator/de.json b/src/assets/i18n/creator/de.json index 41537e07d379a26857f2fa9b4c047127a0cafb45..dd4ab8c08f9097cee0a6ff0db0202f161882699a 100644 --- a/src/assets/i18n/creator/de.json +++ b/src/assets/i18n/creator/de.json @@ -89,7 +89,7 @@ "export": "Exportieren" }, "comment-list-page": { - "search-box-placeholder-text": "Kommentare durchsuchen", + "search": "Suchen", "cancel": "Abbrechen" } -} \ No newline at end of file +} diff --git a/src/assets/i18n/creator/en.json b/src/assets/i18n/creator/en.json index 9a64abd7d01fe37e13a49601d1a483fbde7e3f24..ac9edfcd94354045d5024e150918d8aaaa0de4b7 100644 --- a/src/assets/i18n/creator/en.json +++ b/src/assets/i18n/creator/en.json @@ -89,7 +89,7 @@ "export": "Export" }, "comment-list-page": { - "search-box-placeholder-text": "Search in comments", + "search": "Search", "cancel": "Cancel" } -} \ No newline at end of file +} diff --git a/src/assets/i18n/participant/de.json b/src/assets/i18n/participant/de.json index b45ceb1d8056eb38bc42948696ee0099b130092c..db81bfab034356a7a44cbe481aecbfdec928bb16 100644 --- a/src/assets/i18n/participant/de.json +++ b/src/assets/i18n/participant/de.json @@ -24,7 +24,7 @@ "error-both-fields": "Bitte füllen Sie alle Felder aus." }, "comment-list-page": { - "search-box-placeholder-text": "Kommentare durchsuchen", + "search": "Suchen", "cancel": "Abbrechen" }, "answer": { @@ -48,4 +48,4 @@ "improvable": "Luft nach oben", "no-answers": "Keine Antworten" } -} \ No newline at end of file +} diff --git a/src/assets/i18n/participant/en.json b/src/assets/i18n/participant/en.json index b129791e4df861cad6e0f4c314ae7945e25b2d6a..33772d28f99604bf7925427865ba5a8cdb4a8702 100644 --- a/src/assets/i18n/participant/en.json +++ b/src/assets/i18n/participant/en.json @@ -24,7 +24,7 @@ "error-both-fields": "Please fill in all fields." }, "comment-list-page": { - "search-box-placeholder-text": "Search in comments", + "search": "Search", "cancel": "Cancel" }, "answer": { @@ -48,4 +48,4 @@ "improvable": "Improvable", "no-answers": "No answers" } -} \ No newline at end of file +}