Skip to content
Snippets Groups Projects
Commit 22208587 authored by Thomas Lenz's avatar Thomas Lenz
Browse files

Remove old deletion-view and implement it as matdialog-popup

parent 66c7fd98
Branches
Tags
No related merge requests found
<div fxLayout="column" fxLayoutAlign="start" fxLayoutGap="20px" fxFill> <div fxLayout="column" fxLayoutAlign="start" fxLayoutGap="20px" fxFill>
<div fxLayout="row" fxLayoutAlign="center"> <div fxLayout="row" fxLayoutAlign="center">
<mat-card *ngIf="room && !modify && !deleteDialog" class="input-form"> <mat-card *ngIf="room && !modify" class="input-form">
<mat-card-header> <mat-card-header>
<mat-card-title> <mat-card-title>
<h3 class="subheading-2">{{ room.name }}</h3> <h3 class="subheading-2">{{ room.name }}</h3>
...@@ -70,18 +70,6 @@ ...@@ -70,18 +70,6 @@
</button> </button>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>
<mat-card *ngIf="deleteDialog">
<mat-card-header><h3>Do you really want to delete this room?<br>This action can not be undone.</h3>
</mat-card-header>
<mat-card-content>
<button mat-raised-button color="warn" (click)="deleteRoom(room)">
Delete room
</button>
<button mat-raised-button color="primary" (click)="hideDeletionDialog()">
Leave
</button>
</mat-card-content>
</mat-card>
<div *ngIf="!isLoading && !room">Error: room could not be found!</div> <div *ngIf="!isLoading && !room">Error: room could not be found!</div>
</div> </div>
</div> </div>
...@@ -16,7 +16,6 @@ import { RoomDeletionComponent } from '../room-deletion/room-deletion.component' ...@@ -16,7 +16,6 @@ import { RoomDeletionComponent } from '../room-deletion/room-deletion.component'
export class CreatorRoomComponent extends RoomComponent implements OnInit { export class CreatorRoomComponent extends RoomComponent implements OnInit {
room: Room; room: Room;
modify = false; modify = false;
deleteDialog = false;
roomName: string; roomName: string;
roomShortId: string; roomShortId: string;
roomDescription: string; roomDescription: string;
...@@ -64,14 +63,6 @@ export class CreatorRoomComponent extends RoomComponent implements OnInit { ...@@ -64,14 +63,6 @@ export class CreatorRoomComponent extends RoomComponent implements OnInit {
} }
} }
showDeletionDialog(): void {
this.deleteDialog = true;
}
hideDeletionDialog(): void {
this.deleteDialog = false;
}
deleteRoom(room: Room): void { deleteRoom(room: Room): void {
const msg = room.name + ' deleted'; const msg = room.name + ' deleted';
this.notification.show(msg); this.notification.show(msg);
......
<mat-card> <h3>Are you sure?</h3>
<mat-card-header><h3>Do you really want to delete room<br>' {{room.name}} ' ?<br>This action can not be undone.</h3> <p>Do you really want to delete room<br>' {{room.name}} ' ?<br>This action can not be undone.</p>
</mat-card-header> <div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="10px">
<mat-card-content> <button mat-raised-button color="warn" (click)="dialogRef.close('delete')">
<button mat-raised-button color="warn" (click)="dialogRef.close('delete')"> Delete room
Delete room </button>
</button> <button mat-raised-button color="primary" (click)="onNoClick()">
<button mat-raised-button color="primary" (click)="onNoClick()"> Leave
Leave </button>
</button> </div>
</mat-card-content>
</mat-card>
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