From 029db9f52eb0fb110429495d5669518e2ecef292 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Tue, 7 Mar 2023 15:43:49 +0200 Subject: [PATCH] [Library | data-transfer-v2]: transferData.component.ts: Scroll to message not only if transfer status was successful. --- utils/dataTransfer/transferData.component.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils/dataTransfer/transferData.component.ts b/utils/dataTransfer/transferData.component.ts index 7d41a003..2e979f7f 100644 --- a/utils/dataTransfer/transferData.component.ts +++ b/utils/dataTransfer/transferData.component.ts @@ -185,6 +185,8 @@ export class EGIDataTransferComponent { this.status = "errorParser"; this.message = error.error && error.error.id && error.error.id == 'doiNotSupported'?'DOI not supported.':( error.error && error.error.description && error.error.description? (error.error.description+'.'):'Error parsing information.') ; this.statusMessage = "danger"; + this.cdr.detectChanges(); + HelperFunctions.scrollToId("transferAlert"); /* UIkit.notification(this.message, { status: 'error', timeout: 3000, @@ -275,6 +277,8 @@ export class EGIDataTransferComponent { this.status = "failed"; this.message = "Files could not be transfered."; this.statusMessage = "danger"; + this.cdr.detectChanges(); + HelperFunctions.scrollToId("transferAlert"); // UIkit.notification("Couldn't transfer files", { // status: 'error', // timeout: 6000, @@ -287,6 +291,8 @@ export class EGIDataTransferComponent { this.status = "errorUser"; this.message = "User cannot be authenticated."; this.statusMessage = "danger"; + this.cdr.detectChanges(); + HelperFunctions.scrollToId("transferAlert"); // UIkit.notification("User can't be authenticated!", { // status: 'error', // timeout: 6000,