aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_modals
diff options
context:
space:
mode:
authorNevena Bojovic <nenabojov@gmail.com>2022-05-19 19:48:47 +0200
committerNevena Bojovic <nenabojov@gmail.com>2022-05-19 19:48:47 +0200
commit8f22da6ebd539fa4a219ab4e6265e0d45e02d155 (patch)
tree3067fce5303c8a204e77c0d56c98c1aed881f3b9 /frontend/src/app/_modals
parent6aba6287a85492295ba5de0a0cc6501d492a3676 (diff)
parent1f21329593e94411cac7d5448c119ae746773922 (diff)
Merge branch 'redesign' of http://gitlab.pmf.kg.ac.rs/igrannonica/neuronstellar into redesign
Diffstat (limited to 'frontend/src/app/_modals')
-rw-r--r--frontend/src/app/_modals/alert-dialog/alert-dialog.component.html16
-rw-r--r--frontend/src/app/_modals/alert-dialog/alert-dialog.component.ts6
-rw-r--r--frontend/src/app/_modals/encoding-dialog/encoding-dialog.component.html20
-rw-r--r--frontend/src/app/_modals/missingvalues-dialog/missingvalues-dialog.component.css4
-rw-r--r--frontend/src/app/_modals/yes-no-dialog/yes-no-dialog.component.html8
-rw-r--r--frontend/src/app/_modals/yes-no-dialog/yes-no-dialog.component.ts9
6 files changed, 38 insertions, 25 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();
}
-
-
}
diff --git a/frontend/src/app/_modals/encoding-dialog/encoding-dialog.component.html b/frontend/src/app/_modals/encoding-dialog/encoding-dialog.component.html
index 08c1f26b..fed8f8d7 100644
--- a/frontend/src/app/_modals/encoding-dialog/encoding-dialog.component.html
+++ b/frontend/src/app/_modals/encoding-dialog/encoding-dialog.component.html
@@ -1,15 +1,17 @@
<h2 mat-dialog-title class="text-center">Enkodiranje svih kolona</h2>
<div mat-dialog-content class="mt-5 mb-4">
<p>Sve izabrane kolone biće enkodirane metodom:</p>
- <form (keydown)="withEnterKey($event)">
- <mat-form-field>
- <mat-select matNativeControl [(value)]="selectedEncodingType" cdkFocusInitial>
- <mat-option *ngFor="let option of Object.keys(Encoding); let optionName of Object.values(Encoding)" [value]="option">
- {{ optionName }}
- </mat-option>
- </mat-select>
- </mat-form-field>
- </form>
+ <div class="d-flex justify-content-center">
+ <form (keydown)="withEnterKey($event)">
+ <mat-form-field>
+ <mat-select matNativeControl [(value)]="selectedEncodingType" cdkFocusInitial>
+ <mat-option *ngFor="let option of Object.keys(Encoding); let optionName of Object.values(Encoding)" [value]="option">
+ {{ optionName }}
+ </mat-option>
+ </mat-select>
+ </mat-form-field>
+ </form>
+ </div>
</div>
<div mat-dialog-actions class="justify-content-center">
<button id="btnYes" mat-stroked-button color="basic" (click)="onYesClick()">Potvrdi</button>
diff --git a/frontend/src/app/_modals/missingvalues-dialog/missingvalues-dialog.component.css b/frontend/src/app/_modals/missingvalues-dialog/missingvalues-dialog.component.css
index e99a1e1e..64d7bd21 100644
--- a/frontend/src/app/_modals/missingvalues-dialog/missingvalues-dialog.component.css
+++ b/frontend/src/app/_modals/missingvalues-dialog/missingvalues-dialog.component.css
@@ -5,4 +5,8 @@
#btnNo {
color: gray;
+}
+
+::ng-deep.mat-dialog-content {
+ overflow: visible;
} \ No newline at end of file
diff --git a/frontend/src/app/_modals/yes-no-dialog/yes-no-dialog.component.html b/frontend/src/app/_modals/yes-no-dialog/yes-no-dialog.component.html
index 06e74093..77e7be42 100644
--- a/frontend/src/app/_modals/yes-no-dialog/yes-no-dialog.component.html
+++ b/frontend/src/app/_modals/yes-no-dialog/yes-no-dialog.component.html
@@ -1,8 +1,10 @@
<h2 mat-dialog-title class="text-muted">{{data.title}}</h2>
<div mat-dialog-content class="mt-4" style="color: rgb(81, 76, 76);">
- {{data.message}}
+ <form (keydown)="withEnterKey($event)">
+ {{data.message}}
+ </form>
</div>
<div mat-dialog-actions class="d-flex justify-content-center mt-4">
- <button mat-button cdkFocusInitial (click)="onYesClick()" style="background-color: lightgray;">Da</button>
- <button mat-button cdkFocusInitial (click)="onNoClick()" style="background-color: lightgray;">Ne</button>
+ <button mat-button cdkFocusInitial (click)="onYesClick()" style="background-color: lightgray;">Da</button>
+ <button mat-button cdkFocusInitial (click)="onNoClick()" style="background-color: lightgray;">Ne</button>
</div> \ No newline at end of file
diff --git a/frontend/src/app/_modals/yes-no-dialog/yes-no-dialog.component.ts b/frontend/src/app/_modals/yes-no-dialog/yes-no-dialog.component.ts
index de1cdd4f..a7db1e7f 100644
--- a/frontend/src/app/_modals/yes-no-dialog/yes-no-dialog.component.ts
+++ b/frontend/src/app/_modals/yes-no-dialog/yes-no-dialog.component.ts
@@ -24,10 +24,13 @@ export class YesNoDialogComponent {
onNoClick(): void {
this.dialogRef.close();
}
- onYesClick():void{
+
+ withEnterKey(keyboardEvent: KeyboardEvent) {
+ if (keyboardEvent.code == "Enter" || keyboardEvent.code == "NumpadEnter")
+ this.onYesClick();
+ }
+ onYesClick():void {
this.data.yesFunction();
this.dialogRef.close();
}
-
-
}