From 9577c7841d5671d86f1c9c1252384c2508bc3c73 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Tue, 17 May 2022 12:15:15 +0300 Subject: [PATCH] [common-assets & Library | new-theme]: Fixes for orcid dropdown in authors and increase timeout for addThis check for warning. 1. addThis.component.ts: [Bug fix] Increased timeout to 4 sec and fix check (sometimes innerText was undefined). 2. searchMyOrcidResults.component.html: [Bug fix] Removed uk-animation-fade from results and added uk-scrollspy. 3. showAuthors.component.ts: [Bug fix] Fixed copy to clipboard - data-clipboard-target was not working because we have multiple clipboards in the same page (reverted code to old way of copying). 4. timeout-interceptor.service.ts: Reverted timeout time for client. 5. utils.css: Added custom css for .orcid-dropdown input (orcid dropdown in authors). --- .../landing-utils/addThis.component.ts | 17 ++++++++++---- .../searchMyOrcidResults.component.html | 4 ++-- timeout-interceptor.service.ts | 2 +- utils/authors/showAuthors.component.ts | 23 ++++++++----------- 4 files changed, 25 insertions(+), 21 deletions(-) diff --git a/landingPages/landing-utils/addThis.component.ts b/landingPages/landing-utils/addThis.component.ts index 9753b1a0..88224fb9 100644 --- a/landingPages/landing-utils/addThis.component.ts +++ b/landingPages/landing-utils/addThis.component.ts @@ -1,4 +1,14 @@ -import {Component, EventEmitter, Inject, OnInit, Output, RendererFactory2, ViewEncapsulation} from '@angular/core'; +import { + ChangeDetectorRef, + Component, + EventEmitter, + Inject, + OnInit, + Output, + RendererFactory2, + ViewChild, + ViewEncapsulation +} from '@angular/core'; import {ActivatedRoute} from '@angular/router'; import {DOCUMENT} from "@angular/common"; import {Subscriber} from "rxjs"; @@ -67,11 +77,10 @@ export class AddThisComponent implements OnInit { } } this.subs.push(setTimeout(() => { - if(this.document.getElementById('addThis') && this.document.getElementById('addThis').innerText.length ==0){ + if(this.document.getElementById('addThis') && this.document.getElementById('addThis').innerText){ this.showWarning = true; } - }, 2000)); - + }, 4000)); }catch (e) { // console.error(e) } diff --git a/orcid/my-orcid-links/searchMyOrcidResults.component.html b/orcid/my-orcid-links/searchMyOrcidResults.component.html index 731a80f0..c7848ea2 100644 --- a/orcid/my-orcid-links/searchMyOrcidResults.component.html +++ b/orcid/my-orcid-links/searchMyOrcidResults.component.html @@ -5,10 +5,10 @@ [totalResults]="totalResults"> -