From 0708a4f58d5a88477ae447b22f0e2e5886ce77c7 Mon Sep 17 00:00:00 2001 From: apapachristou Date: Wed, 22 May 2019 16:36:24 +0300 Subject: [PATCH] Restyles: Confirmation Dialog --- .../confirmation-dialog.component.html | 13 +++++++++---- .../confirmation-dialog.component.scss | 9 +++++++-- .../confirmation-dialog.component.ts | 4 ++++ .../app/ui/dmp/overview/dmp-overview.component.ts | 2 +- dmp-frontend/src/assets/i18n/en.json | 4 +++- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.html b/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.html index 345d628b1..e271af646 100644 --- a/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.html +++ b/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.html @@ -1,10 +1,15 @@
-
- {{ data.message }} +
+
+ {{ data.message }} +
+
close
-
-
+
+
diff --git a/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.scss b/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.scss index 66766e78c..f43e5fd2f 100644 --- a/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.scss +++ b/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.scss @@ -3,13 +3,18 @@ padding-bottom: 20px; } + .close-btn { + margin-left: auto; + cursor: pointer; + } + .cancel { - background-color: #ba2c2c; + background-color: #aaaaaa; color: #ffffff; } .confirm { - background-color: #92d050; + background-color: #ba2c2c; color: #ffffff; } diff --git a/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.ts b/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.ts index e6a62a9c5..26e1e63f3 100644 --- a/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.ts +++ b/dmp-frontend/src/app/library/confirmation-dialog/confirmation-dialog.component.ts @@ -14,6 +14,10 @@ export class ConfirmationDialogComponent { ) { } + close() { + this.dialogRef.close(false); + } + cancel() { this.dialogRef.close(false); } diff --git a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts index c17e89db2..e119d9383 100644 --- a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts +++ b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts @@ -93,7 +93,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit { maxWidth: '300px', data: { message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.DELETE-ITEM'), - confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'), + confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.DELETE'), cancelButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CANCEL') } }); diff --git a/dmp-frontend/src/assets/i18n/en.json b/dmp-frontend/src/assets/i18n/en.json index 5a28dc6d9..de1b0c4bb 100644 --- a/dmp-frontend/src/assets/i18n/en.json +++ b/dmp-frontend/src/assets/i18n/en.json @@ -36,7 +36,9 @@ "DELETE-ITEM": "Delete this item?", "ACTIONS": { "CONFIRM": "Yes", - "CANCEL": "No" + "No": "No", + "DELETE": "Delete", + "CANCEL": "Cancel" } }, "ACTIONS": {