From ce87f0690df1877d6e08c3b769f79aa57e96cd70 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Mon, 22 Apr 2024 17:14:46 +0300 Subject: [PATCH 1/6] [develop | DONE | FIXED]: BUG fixes in orcid author modal | BUG fixes in search filters column. 1. mobile-dropdown.component.ts: Added makrForCheck() method call in "open()". 2. deletedByInference.component.ts: Added @Input() isMobile: boolean = false; & In set parameter [isMobile]="isMobile". 3. resultLanding.component.html: In mobile view, in set parameters [isMobile]="isMobile" and [modal]="alertModalDeletedByInferenceFS". 4. showAuthors.component.ts: 5. searchOrganizations.component.ts: [BUG FIX] In set parameter [showRefine]="refineFields?.length > 0" to display filters or not. 6. newSearchPage.component.html: [BUG FIX] Updated checks for displaying refine filters column or not. --- .../deletedByInference.component.ts | 3 ++- .../result/resultLanding.component.html | 16 ++++++++++++---- searchPages/searchOrganizations.component.ts | 1 + .../searchUtils/newSearchPage.component.html | 10 ++++++++-- utils/authors/showAuthors.component.ts | 17 ++++++++++------- .../mobile-dropdown.component.ts | 1 + 6 files changed, 34 insertions(+), 14 deletions(-) diff --git a/landingPages/result/deletedByInference/deletedByInference.component.ts b/landingPages/result/deletedByInference/deletedByInference.component.ts index 30ebb017..b986c240 100644 --- a/landingPages/result/deletedByInference/deletedByInference.component.ts +++ b/landingPages/result/deletedByInference/deletedByInference.component.ts @@ -28,7 +28,7 @@ import {HelperFunctions} from "../../../utils/HelperFunctions.class";
  • + [isDeletedByInferenceModal]="true" [isMobile]="isMobile">
  • + [resultType]="type" [type]="openaireEntities.PUBLICATIONS" + [isMobile]="isMobile" + [modal]="alertModalDeletedByInferenceFS"> + [resultType]="'dataset'" [type]="openaireEntities.DATASETS" + [isMobile]="isMobile" + [modal]="alertModalDeletedByInferenceFS"> + [resultType]="type" [type]="openaireEntities.SOFTWARE" + [isMobile]="isMobile" + [modal]="alertModalDeletedByInferenceFS"> + [resultType]="'other'" [type]="openaireEntities.OTHER" + [isMobile]="isMobile" + [modal]="alertModalDeletedByInferenceFS"> diff --git a/searchPages/searchOrganizations.component.ts b/searchPages/searchOrganizations.component.ts index 415ee722..45c49dcc 100644 --- a/searchPages/searchOrganizations.component.ts +++ b/searchPages/searchOrganizations.component.ts @@ -33,6 +33,7 @@ import {RefineFieldResultsService} from "../services/refineFieldResults.service" [includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter" [searchForm]="searchForm" [sort]="false" + [showRefine]="refineFields?.length > 0" [filters]="filters" [simpleView]="simpleView" formPlaceholderText="Search by organization name..." [showSwitchSearchLink]="showSwitchSearchLink" diff --git a/searchPages/searchUtils/newSearchPage.component.html b/searchPages/searchUtils/newSearchPage.component.html index c623abc1..f5349f5d 100644 --- a/searchPages/searchUtils/newSearchPage.component.html +++ b/searchPages/searchUtils/newSearchPage.component.html @@ -288,8 +288,14 @@
    -
    + + + + + + +
    diff --git a/utils/authors/showAuthors.component.ts b/utils/authors/showAuthors.component.ts index eccccd6f..0269c95c 100644 --- a/utils/authors/showAuthors.component.ts +++ b/utils/authors/showAuthors.component.ts @@ -19,7 +19,7 @@ import {properties} from "../../../../environments/environment"; @Component({ selector: 'showAuthors', template: ` - + {{author.fullName + ";"}} @@ -36,7 +36,7 @@ import {properties} from "../../../../environments/environment";
    + uk-dropdown="mode:click; offset: 4;" style="min-width: 465px !important;" [attr.container]="modal ? false : true">
    @@ -112,7 +112,7 @@ import {properties} from "../../../../environments/environment"; + *ngTemplateOutlet="author_template; context: { author: author, i:i, italic: true, modal: modal}"> +{{authors.length - authorsLimit | number}} more @@ -127,18 +127,18 @@ import {properties} from "../../../../environments/environment";
    - +
    - +
    - +
    - +
    @@ -174,6 +174,9 @@ export class ShowAuthorsComponent { if (this.modal) { this.modal.cancel(); } + if(this.authorsModal) { + this.authorsModal.cancel(); + } } public viewAllClick() { diff --git a/utils/mobile-dropdown/mobile-dropdown.component.ts b/utils/mobile-dropdown/mobile-dropdown.component.ts index d7ce6e3f..db944564 100644 --- a/utils/mobile-dropdown/mobile-dropdown.component.ts +++ b/utils/mobile-dropdown/mobile-dropdown.component.ts @@ -56,6 +56,7 @@ export class MobileDropdownComponent implements OnInit{ parent.removeChild(this.element.nativeElement); container.append(this.element.nativeElement); this.opened = true; + this.cdr.markForCheck(); body.setAttribute('style', 'overflow-y: hidden'); } } From e74dc1b58fd6502940c27846d776c14fab63ef46 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Tue, 23 Apr 2024 16:01:47 +0300 Subject: [PATCH 2/6] [develop | DONE | FIXED]: showAuthors.component.ts: In uk-dropdown set "pos: bottom-right" and [attr.container]="modal ? '#modal-container' : false" - copy to clipboard is not fully functional. --- utils/authors/showAuthors.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/authors/showAuthors.component.ts b/utils/authors/showAuthors.component.ts index 0269c95c..3f02a0f2 100644 --- a/utils/authors/showAuthors.component.ts +++ b/utils/authors/showAuthors.component.ts @@ -36,7 +36,7 @@ import {properties} from "../../../../environments/environment";
    + uk-dropdown="mode:click; offset: 4; pos: bottom-right" style="min-width: 465px !important;" [attr.container]="modal ? '#modal-container' : false">
    From 2cd80597948ad2878b6ef6ef036377f16342183a Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Tue, 23 Apr 2024 16:58:48 +0300 Subject: [PATCH 3/6] [develop | WIP | FIXED]: showAuthors.component.ts: In uk-dropdown set [attr.container]="'#modal-container'" to always be on top of every other part of the page. --- utils/authors/showAuthors.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/authors/showAuthors.component.ts b/utils/authors/showAuthors.component.ts index 3f02a0f2..a400b722 100644 --- a/utils/authors/showAuthors.component.ts +++ b/utils/authors/showAuthors.component.ts @@ -36,7 +36,7 @@ import {properties} from "../../../../environments/environment";
    + uk-dropdown="mode:click; offset: 4; pos: bottom-right" style="min-width: 465px !important;" [attr.container]="'#modal-container'">
    From 267944103f6f06ced39bb37e4c70d1834b742601 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Wed, 24 Apr 2024 09:39:27 +0300 Subject: [PATCH 4/6] [develop]: update link to develop in bottom. --- sharedComponents/bottom.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sharedComponents/bottom.component.html b/sharedComponents/bottom.component.html index 45389b2d..dd70125f 100644 --- a/sharedComponents/bottom.component.html +++ b/sharedComponents/bottom.component.html @@ -101,7 +101,7 @@
  • Monitor
  • -
  • Develop
  • +
  • Develop
  • From c5bd710621d052a5327ea2daea3654f95c23c863 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Wed, 24 Apr 2024 16:06:45 +0300 Subject: [PATCH 5/6] [develop | WIP | CHANGED]: [BETA] parsingFunctions.class.ts: Show all subjects as keywords - updated method "parseAllSubjects()" to add classified subjects (by vocabulary) to the end of the keyword subjects list. --- .../landing-utils/parsingFunctions.class.ts | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/landingPages/landing-utils/parsingFunctions.class.ts b/landingPages/landing-utils/parsingFunctions.class.ts index d5d614a3..799f71db 100644 --- a/landingPages/landing-utils/parsingFunctions.class.ts +++ b/landingPages/landing-utils/parsingFunctions.class.ts @@ -581,7 +581,7 @@ export class ParsingFunctions { return eoscSubjectsFound; } - + // publication & dataset landing : for subjects and otherSubjects and classifiedSubjects parseAllSubjects(_subjects: any, vocabulary: any): [string[], Map, Map, string[], string[],] { // let eoscSubjectsFound = []; @@ -590,12 +590,12 @@ export class ParsingFunctions { let classifiedSubjects: Map; let fos: string[]; let sdg: string[]; - + let setOfEoscSubjects: Set = new Set(); - + let subject; let length = Array.isArray(_subjects) ? _subjects.length : 1; - + for (let i = 0; i < length; i++) { subject = Array.isArray(_subjects) ? _subjects[i] : _subjects; if (subject.classid != "") { @@ -628,7 +628,7 @@ export class ParsingFunctions { if (classifiedSubjects == undefined) { classifiedSubjects = new Map(); } - + let content: string = subject.content + ""; // let checkAndAddEoscSubjectResp = this.checkAndAddEoscSubject(setOfEoscSubjects, eoscSubjectsFound, subject, content); // let found: boolean = checkAndAddEoscSubjectResp["found"]; @@ -639,7 +639,11 @@ export class ParsingFunctions { if (!classifiedSubjects.has(subject.classname)) { classifiedSubjects.set(subject.classname, new Array()); } - classifiedSubjects.get(subject.classname).push(content); + if(properties.environment == "production") { + classifiedSubjects.get(subject.classname).push(content); + } else { + classifiedSubjects.get(subject.classname).push(subject.classid + ": " + content); + } // } } } else { @@ -659,6 +663,14 @@ export class ParsingFunctions { } } } + + if(properties.environment != "production") { + for (let classified of classifiedSubjects.keys()) { + subjects = subjects.concat(classifiedSubjects.get(classified)); + } + classifiedSubjects = null; + } + return [subjects, otherSubjects, classifiedSubjects, fos, sdg]; } From ac46ecb99721e9e384a70e3522b7cc40d0b17f6e Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Wed, 24 Apr 2024 16:35:13 +0300 Subject: [PATCH 6/6] [develop | WIP | FIXED]: parsingFunctions.class.ts: Added check if there are no classifiedSubjects. --- landingPages/landing-utils/parsingFunctions.class.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/landingPages/landing-utils/parsingFunctions.class.ts b/landingPages/landing-utils/parsingFunctions.class.ts index 799f71db..26c1f9d0 100644 --- a/landingPages/landing-utils/parsingFunctions.class.ts +++ b/landingPages/landing-utils/parsingFunctions.class.ts @@ -664,7 +664,7 @@ export class ParsingFunctions { } } - if(properties.environment != "production") { + if(properties.environment != "production" && classifiedSubjects != null) { for (let classified of classifiedSubjects.keys()) { subjects = subjects.concat(classifiedSubjects.get(classified)); }