From cad0fe90610e8122a42068fbc59e1d6b7919be0d Mon Sep 17 00:00:00 2001 From: "argiro.kokogiannaki" Date: Fri, 27 Mar 2020 12:39:18 +0000 Subject: [PATCH] [Trunk|Library] Search pages: remove logs fix issue in /search/find when switch access mode filter search all: don't hide number when change tabs deposit results add space between cards git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58348 d315682c-612b-4755-9ff5-7f18f6832af3 --- .../selected/metadataPreview.component.html | 2 +- deposit/searchResultsInDeposit.component.html | 2 +- .../citeThis/citeThis.component.ts | 1 - .../landing-utils/parsingFunctions.class.ts | 1 - searchPages/find/searchAll.component.html | 12 ++++------ searchPages/find/searchAll.component.ts | 13 +++-------- searchPages/searchDataProviders.component.ts | 4 ++-- .../searchResearchResults.component.ts | 1 - .../advancedSearchForm.component.html | 2 +- .../searchUtils/datasourcesHelper.class.ts | 1 - .../searchUtils/newSearchPage.component.ts | 22 +++++++++---------- .../searchUtils/quick-selections.component.ts | 19 ++++++++++++---- .../environment-specific.service.ts | 1 + 13 files changed, 39 insertions(+), 42 deletions(-) diff --git a/claims/linking/selected/metadataPreview.component.html b/claims/linking/selected/metadataPreview.component.html index 85fd5d4f..6e8b0361 100644 --- a/claims/linking/selected/metadataPreview.component.html +++ b/claims/linking/selected/metadataPreview.component.html @@ -131,7 +131,7 @@ - Type AA + Type -
    +
    • Projects - + ({{fetchProjects.searchUtils.totalResults | number}})
    • @@ -56,8 +54,7 @@ [class]="activeEntity == 'datasources'?'uk-active':''"> Content Providers - + ({{fetchDataproviders.searchUtils.totalResults | number}}) @@ -65,8 +62,7 @@ [class]="activeEntity == 'organizations'?'uk-active':''"> Organizations - + ({{fetchOrganizations.searchUtils.totalResults | number}}) diff --git a/searchPages/find/searchAll.component.ts b/searchPages/find/searchAll.component.ts index 44939b68..253bc0b4 100644 --- a/searchPages/find/searchAll.component.ts +++ b/searchPages/find/searchAll.component.ts @@ -78,13 +78,6 @@ export class SearchAllComponent { public errorCodes: ErrorCodes = new ErrorCodes(); public routerHelper: RouterHelper = new RouterHelper(); - public publicationsSize: any = null; - public datasetsSize: any = null; - public softwareSize: any = null; - public oprsSize: any = null; - public fundersSize: any = null; - public projectsSize: any = null; - public datasourcesSize: any = null; showPublications: boolean = false; showDatasets: boolean = false; showSoftware: boolean = false; @@ -214,7 +207,7 @@ export class SearchAllComponent { this.reloadTabs(); this.sub = this.route.queryParams.subscribe(params => { this.parameters = Object.assign({}, params); - this.keyword = (params['keyword']) ? params['keyword'] : (params["q"] ? params["q"] : ""); + this.keyword = (params['keyword']) ? params['keyword'] : (params["q"] ? params["q"] : (params["f0"] && params["f0"] == "q" && params["fv0"]?params["fv0"]:"")); this.selectedFields[0].value = this.keyword; this.quickFilter.selected = ((params['qf']== undefined || params["qf"] == "true") == true); if (params["type"] && params["type"].length > 0) { @@ -332,8 +325,8 @@ export class SearchAllComponent { delete this.parameters['q']; delete this.parameters['op']; } else { - this.parameters["q"] = keyword; - this.parameters["op"] = "and"; + this.parameters["fv0"] = keyword; + this.parameters["f0"] = "q"; } } private prepareResultParameters() { diff --git a/searchPages/searchDataProviders.component.ts b/searchPages/searchDataProviders.component.ts index 4d4ba7a2..6f6578a0 100644 --- a/searchPages/searchDataProviders.component.ts +++ b/searchPages/searchDataProviders.component.ts @@ -125,7 +125,7 @@ export class SearchDataProvidersComponent { this.searchPage.keywordFields = this.searchFields.DEPOSIT_DATASOURCE_KEYWORD_FIELDS; this.searchPage.usedBy = "deposit"; } - console.log(this.refineFields) + // console.log(this.refineFields) this.searchPage.prepareSearchPage(this.fieldIds, this.selectedFields, this.refineFields, [], this.fieldIdsMap,this.customFilter,params, "dataprovider"); this.getResults(this.searchPage.getSearchAPIQueryForAdvancedSearhFields(), this.searchUtils.page, this.searchUtils.size, refine, this.searchPage.getSearchAPIQueryForRefineFields(params, firstLoad)); }); @@ -164,7 +164,7 @@ export class SearchDataProvidersComponent { data => { this.searchUtils.totalResults = data[0]; this.results = data[1]; - console.log(this.results); + //console.log(this.results); if (refine) { this.filters = this.searchPage.prepareFiltersToShow((this.type=="all" || this.type == "deposit")?data[2]:this.filters); }else{ diff --git a/searchPages/searchResearchResults.component.ts b/searchPages/searchResearchResults.component.ts index 96baa4da..abeee374 100644 --- a/searchPages/searchResearchResults.component.ts +++ b/searchPages/searchResearchResults.component.ts @@ -92,7 +92,6 @@ export class SearchResearchResultsComponent { } ngOnInit() { - console.log(this.quickFilter); //TODO add checks about which result types are enabled! this.route.data.subscribe((data: { envSpecific: EnvProperties }) => { this.properties = data.envSpecific; diff --git a/searchPages/searchUtils/advancedSearchForm.component.html b/searchPages/searchUtils/advancedSearchForm.component.html index 7e2bed10..6ebc8dd9 100644 --- a/searchPages/searchUtils/advancedSearchForm.component.html +++ b/searchPages/searchUtils/advancedSearchForm.component.html @@ -132,7 +132,7 @@
      + [class]="((entitiesSelection)?'':'uk-width-small@s')+' uk-margin-small-top uk-padding-remove-left'"> {this.actuallyChanged()} ); + } ngOnChanges(changes: SimpleChanges): void { diff --git a/utils/properties/environment-specific.service.ts b/utils/properties/environment-specific.service.ts index 15ecafa7..2c04f7f4 100644 --- a/utils/properties/environment-specific.service.ts +++ b/utils/properties/environment-specific.service.ts @@ -59,6 +59,7 @@ export class EnvironmentSpecificService { if (this.envSpecific === null || this.envSpecific === undefined) { var domain = this.getDomain(); var location = this.getFullUrl(); + // location = "http://dl170.madgik.di.uoa.gr/monitor/assets/env-properties.json"; // console.log('subscribeEnvironment: Loading '+ location); return this.http.get(location) .pipe(map((data) => {