From a3c79137aa30a57096a9f04c715d99bb4649f88b Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Wed, 7 Feb 2024 21:28:45 +0200 Subject: [PATCH] [develop | DONE | CHANGED]: Remove preselected "Open Access" filter from search. 1. home.component.ts: Set field "resultsQuickFilter" to null. 2. searchAll.component.ts: Set field "quickFilter" to null | In method "entityChanged()" do not set parameter "resultbestaccessright" | [BUG FIX] Clear subscriptions from fetchOrps. 3. searchResearchResults.component.ts: Set field "quickFilter" to null. 4. navigationBar.component.ts: Set field "resultsQuickFilter" to null. 5. app.component.ts: Remove "resultbestaccessright" parameter from menu items of Search research products. --- explore/src/app/app.component.ts | 12 ++++++------ explore/src/app/home/home.component.ts | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/explore/src/app/app.component.ts b/explore/src/app/app.component.ts index 7de1b674..a17526e3 100644 --- a/explore/src/app/app.component.ts +++ b/explore/src/app/app.component.ts @@ -167,15 +167,15 @@ export class AppComponent { this.userMenuItems.push(new MenuItem("", "My profile", "", "", false, [], [], {})); this.userMenuItems.push(new MenuItem("", "My ORCID links", "", "/my-orcid-links", false, [], [""], {})); this.userMenuItems.push(new MenuItem("", "My links", "", "/myclaims", false, [], ["/myclaims"], {})); - let researchOutcomesMenu = new MenuItem("", OpenaireEntities.RESULTS, "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], {resultbestaccessright: '"' + encodeURIComponent("Open Access") + '"'}); + let researchOutcomesMenu = new MenuItem("", OpenaireEntities.RESULTS, "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], {}); researchOutcomesMenu.items = [ - new MenuItem("", OpenaireEntities.PUBLICATIONS, "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], {type: '"' + encodeURIComponent("publications") + '"', resultbestaccessright: '"' + encodeURIComponent("Open Access") + '"'}), - new MenuItem("", OpenaireEntities.DATASETS, "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], {type: '"' + encodeURIComponent("datasets") + '"', resultbestaccessright: '"' + encodeURIComponent("Open Access") + '"'}), - new MenuItem("", OpenaireEntities.SOFTWARE, "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], {type: '"' + encodeURIComponent("software") + '"', resultbestaccessright: '"' + encodeURIComponent("Open Access") + '"'}), - new MenuItem("", OpenaireEntities.OTHER, "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], {type: '"' + encodeURIComponent("other") + '"', resultbestaccessright: '"' + encodeURIComponent("Open Access") + '"'})]; + new MenuItem("", OpenaireEntities.PUBLICATIONS, "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], {type: '"' + encodeURIComponent("publications") + '"'}), + new MenuItem("", OpenaireEntities.DATASETS, "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], {type: '"' + encodeURIComponent("datasets") + '"'}), + new MenuItem("", OpenaireEntities.SOFTWARE, "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], {type: '"' + encodeURIComponent("software") + '"'}), + new MenuItem("", OpenaireEntities.OTHER, "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], {type: '"' + encodeURIComponent("other") + '"'})]; //TODO add check for research results route this.menuItems = [ - new MenuItem("search", "Search", "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], {resultbestaccessright: '"' + encodeURIComponent("Open Access") + '"'}, + new MenuItem("search", "Search", "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], {}, null, null, null, null, "_blank", "internal", false, [ researchOutcomesMenu, diff --git a/explore/src/app/home/home.component.ts b/explore/src/app/home/home.component.ts index 5bbbbfb7..f5cab70c 100644 --- a/explore/src/app/home/home.component.ts +++ b/explore/src/app/home/home.component.ts @@ -125,12 +125,12 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit { @ViewChild('contact') contact: ElementRef; subscriptions: any[] = []; @ViewChildren('scrolling_element') elements: QueryList; - resultsQuickFilter: { filter: Filter, selected: boolean, filterId: string, value: string } = { - filter: null, - selected: true, - filterId: "resultbestaccessright", - value: "Open Access" - }; + resultsQuickFilter: { filter: Filter, selected: boolean, filterId: string, value: string } = null;//{ + // filter: null, + // selected: true, + // filterId: "resultbestaccessright", + // value: "Open Access" + // }; selectedEntity = "all"; selectedEntitySimpleUrl; selectedEntityAdvancedUrl;