diff options
author | Ognjen Cirkovic <ciraboxkg@gmail.com> | 2022-05-19 13:09:02 +0200 |
---|---|---|
committer | Ognjen Cirkovic <ciraboxkg@gmail.com> | 2022-05-19 13:09:02 +0200 |
commit | 984e969e74a6e21c520bd20e59b077aa0b8f5e06 (patch) | |
tree | 9a49d0d16f734a152814c7e2dc971c3f6a9452ad /frontend/src/app/_modals/alert-dialog | |
parent | c2aa2abb6c4c6fa65d16812e7858f6ddf8034384 (diff) | |
parent | 5dab3cad1e3f4d0c97525f77db90ca11cd8a4eb9 (diff) |
Merge branch 'redesign' of http://gitlab.pmf.kg.ac.rs/igrannonica/neuronstellar into Redesign
Diffstat (limited to 'frontend/src/app/_modals/alert-dialog')
-rw-r--r-- | frontend/src/app/_modals/alert-dialog/alert-dialog.component.html | 16 | ||||
-rw-r--r-- | frontend/src/app/_modals/alert-dialog/alert-dialog.component.ts | 6 |
2 files changed, 12 insertions, 10 deletions
diff --git a/frontend/src/app/_modals/alert-dialog/alert-dialog.component.html b/frontend/src/app/_modals/alert-dialog/alert-dialog.component.html index 2d7e4d86..84793260 100644 --- a/frontend/src/app/_modals/alert-dialog/alert-dialog.component.html +++ b/frontend/src/app/_modals/alert-dialog/alert-dialog.component.html @@ -1,9 +1,9 @@ - - - <h2 mat-dialog-title >{{data.title}}</h2> - <div mat-dialog-content class="mt-4 text-offwhite" > - {{data.message}} - </div> - <div mat-dialog-actions class="d-flex justify-content-center mt-4"> +<h2 mat-dialog-title>{{data.title}}</h2> +<div mat-dialog-content class="mt-4 text-offwhite"> + <form (keydown)="withEnterKey($event)"> + {{data.message}} + </form> +</div> +<div mat-dialog-actions class="d-flex justify-content-center mt-4"> <button mat-raised-button cdkFocusInitial (click)="onOkClick()" color="basic">OK</button> - </div>
\ No newline at end of file +</div>
\ No newline at end of file diff --git a/frontend/src/app/_modals/alert-dialog/alert-dialog.component.ts b/frontend/src/app/_modals/alert-dialog/alert-dialog.component.ts index e15f3c6f..7558b527 100644 --- a/frontend/src/app/_modals/alert-dialog/alert-dialog.component.ts +++ b/frontend/src/app/_modals/alert-dialog/alert-dialog.component.ts @@ -20,9 +20,11 @@ export class AlertDialogComponent { //public dialog: MatDialog ) {} + withEnterKey(keyboardEvent: KeyboardEvent) { + if (keyboardEvent.code == "Enter" || keyboardEvent.code == "NumpadEnter") + this.onOkClick(); + } onOkClick(): void { this.dialogRef.close(); } - - } |