Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
frag.jetzt SWTP 2022
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Marc Tröll
frag.jetzt SWTP 2022
Commits
e13468c7
Commit
e13468c7
authored
7 years ago
by
Thomas Lenz
Browse files
Options
Downloads
Patches
Plain Diff
Add deletion confirmation
parent
de0e4f73
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/creator-room/creator-room.component.html
+16
-3
16 additions, 3 deletions
src/app/creator-room/creator-room.component.html
src/app/creator-room/creator-room.component.ts
+9
-0
9 additions, 0 deletions
src/app/creator-room/creator-room.component.ts
with
25 additions
and
3 deletions
src/app/creator-room/creator-room.component.html
+
16
−
3
View file @
e13468c7
<div
fxLayout=
"column"
fxLayoutAlign=
"start"
fxLayoutGap=
"20px"
fxFill
>
<div
fxLayout=
"row"
fxLayoutAlign=
"center"
>
<mat-progress-spinner
*ngIf=
"isLoading"
mode=
"indeterminate"
></mat-progress-spinner>
<mat-card
*ngIf=
"room"
>
<mat-card
*ngIf=
"room
&& !deleteDialog
"
>
<mat-card-header>
<mat-card-title><h3
class=
"subheading-2"
>
{{ room.name }}
</h3></mat-card-title>
<mat-card-subtitle>
{{ room.id }}
</mat-card-subtitle>
...
...
@@ -20,10 +20,11 @@
<button
mat-button
color=
"primary"
matTooltip=
"See contents"
>
Contents
</button>
<button
mat-button
color=
"primary"
matTooltip=
"See room comments"
routerLink=
"/creator/room/{{room.id}}/comments"
>
<button
mat-button
color=
"primary"
matTooltip=
"See room comments"
routerLink=
"/creator/room/{{room.id}}/comments"
>
Comments
</button>
<button
mat-button
color=
"warn"
matTooltip=
"
Delete selected room"
(click)=
"delete(room
)"
>
<button
mat-button
color=
"warn"
matTooltip=
"
Enables deletion dialog"
(click)=
"enableDeletion(
)"
>
Delete room
</button>
<button
mat-button
color=
"primary"
matTooltip=
"Go back to last page"
(click)=
"goBack()"
>
...
...
@@ -31,6 +32,18 @@
</button>
</mat-card-actions>
</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"
matTooltip=
"Delete selected room"
(click)=
"delete(room)"
>
Delete room
</button>
<button
mat-raised-button
color=
"primary"
matTooltip=
"Leave delete dialog"
(click)=
"disableDeletion()"
>
Leave
</button>
</mat-card-content>
</mat-card>
<div
*ngIf=
"!isLoading && !room"
>
Error: room could not be found!
</div>
</div>
</div>
This diff is collapsed.
Click to expand it.
src/app/creator-room/creator-room.component.ts
+
9
−
0
View file @
e13468c7
...
...
@@ -12,6 +12,7 @@ import { Location } from '@angular/common';
})
export
class
CreatorRoomComponent
extends
RoomComponent
implements
OnInit
{
room
:
Room
;
deleteDialog
=
false
;
constructor
(
protected
roomService
:
RoomService
,
protected
route
:
ActivatedRoute
,
...
...
@@ -29,4 +30,12 @@ export class CreatorRoomComponent extends RoomComponent implements OnInit {
this
.
location
.
back
();
}
enableDeletion
():
void
{
this
.
deleteDialog
=
true
;
}
disableDeletion
():
void
{
this
.
deleteDialog
=
false
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment