diff options
author | Sonja Galovic <galovicsonja@gmail.com> | 2022-05-19 12:55:33 +0200 |
---|---|---|
committer | Sonja Galovic <galovicsonja@gmail.com> | 2022-05-19 12:55:33 +0200 |
commit | 2c75cea0ef88d9db56e30b31470edb1bcc437350 (patch) | |
tree | ca47f1fc22276a5c0ab9d90c9d17573f21f01bc0 /frontend/src/app/_modals/alert-dialog | |
parent | 6e2ce46164efc843302b30b6fc3b9e080d5f604d (diff) |
Popravljena numeracija redova kod stranicenja u column-table. Dodat submit na enter gde je falio. Css izmene.
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(); } - - } |