From 373bbcde7d589f1a187df9b8f0877e761ef39ba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Mau=C3=9F?= <lukas.mauss@mni.thm.de> Date: Mon, 8 Oct 2018 18:46:52 +0200 Subject: [PATCH] Fix collection selection --- .../content-text-creator.component.html | 2 +- .../content-text-creator.component.ts | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/app/components/fragments/content-text-creator/content-text-creator.component.html b/src/app/components/fragments/content-text-creator/content-text-creator.component.html index 18e7619ae..47b0b0c8e 100644 --- a/src/app/components/fragments/content-text-creator/content-text-creator.component.html +++ b/src/app/components/fragments/content-text-creator/content-text-creator.component.html @@ -10,7 +10,7 @@ <markdown [data]="content.body"></markdown> <mat-form-field> <input matInput #group type="text" matInput [formControl]="myControl" [matAutocomplete]="auto" - placeholder="Collection" name="group"/> + placeholder="Collection"/> <mat-autocomplete #auto="matAutocomplete"> <mat-option *ngFor="let collection of filteredOptions | async" [value]="collection"> {{collection}} diff --git a/src/app/components/fragments/content-text-creator/content-text-creator.component.ts b/src/app/components/fragments/content-text-creator/content-text-creator.component.ts index 154e20d0a..99d4cc22b 100644 --- a/src/app/components/fragments/content-text-creator/content-text-creator.component.ts +++ b/src/app/components/fragments/content-text-creator/content-text-creator.component.ts @@ -6,12 +6,11 @@ import { NotificationService } from '../../../services/util/notification.service import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material'; import { ContentListComponent } from '../content-list/content-list.component'; import { ContentDeleteComponent } from '../../dialogs/content-delete/content-delete.component'; -import { CollectionSelectComponent } from '../../dialogs/collection-select/collection-select.component'; import { map, startWith } from 'rxjs/operators'; import { FormControl } from '@angular/forms'; import { Observable } from 'rxjs'; import { RoomService } from '../../../services/http/room.service'; -import {Room} from "../../../models/room"; +import { Room } from '../../../models/room'; @Component({ selector: 'app-content-text-creator', @@ -32,7 +31,7 @@ export class ContentTextCreatorComponent implements OnInit { 1, [], ); - collections: string[]; // ['ARSnova', 'Angular', 'HTML', 'TypeScript' ]; + collections: string[] = ['ARSnova', 'Angular', 'HTML', 'TypeScript' ]; myControl = new FormControl(); filteredOptions: Observable<string[]>; @@ -69,12 +68,6 @@ export class ContentTextCreatorComponent implements OnInit { this.notificationService.show('Content submitted. Ready for creation of new content.'); } - openCollectionSelectDialog(): void { - this.dialog.open(CollectionSelectComponent, { - width: '350px' - }); - } - submitContent(subject: string, body: string, group: string) { this.contentService.addContent(new ContentText( '1', @@ -89,7 +82,6 @@ export class ContentTextCreatorComponent implements OnInit { this.notificationService.show('No empty fields allowed. Please check subject and body.'); return; } - this.notificationService.show('Content submitted.'); this.resetAfterSubmit(); } -- GitLab