From d8e31242e80d278c51608cb12cef5c73a982f178 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Tue, 5 May 2020 08:46:10 +0000 Subject: [PATCH] [Trunk | Library]: 1. subscribe.service.ts: Remove unnecessary prints. 2. newSearchPage.component.ts: Set default value for field 'sort' to true. 3. newSearchPage.component.html: In bind entityType parameter. 4. searchResearchResults.component.ts: Remove data binding for 'sort' in . 5. searchProjects.component.ts & searchOrganizations.component.ts & searchDataProviders.component.ts: Add data binding [sort]="false"in . git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58594 d315682c-612b-4755-9ff5-7f18f6832af3 --- searchPages/searchDataProviders.component.ts | 3 ++- searchPages/searchOrganizations.component.ts | 2 +- searchPages/searchProjects.component.ts | 1 + searchPages/searchResearchResults.component.ts | 2 -- searchPages/searchUtils/newSearchPage.component.html | 2 +- searchPages/searchUtils/newSearchPage.component.ts | 2 +- utils/subscribe/subscribe.service.ts | 6 +----- 7 files changed, 7 insertions(+), 11 deletions(-) diff --git a/searchPages/searchDataProviders.component.ts b/searchPages/searchDataProviders.component.ts index 4f0275ed..599c3be6 100644 --- a/searchPages/searchDataProviders.component.ts +++ b/searchPages/searchDataProviders.component.ts @@ -36,7 +36,8 @@ import {DatasourcesHelperClass} from "./searchUtils/datasourcesHelper.class"; [filters]="filters" [simpleView]="simpleView" formPlaceholderText="Search by name, description, subject..." [showResultCount]="(type=='all' || type == 'deposit')" [showLastIndex]="type!='deposit'" - [tableViewLink]="tableViewLink"> + [tableViewLink]="tableViewLink" + [sort]="false"> diff --git a/searchPages/searchOrganizations.component.ts b/searchPages/searchOrganizations.component.ts index e09477eb..7d3bf698 100644 --- a/searchPages/searchOrganizations.component.ts +++ b/searchPages/searchOrganizations.component.ts @@ -29,7 +29,7 @@ import {NewSearchPageComponent} from "./searchUtils/newSearchPage.component"; [piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix" searchFormClass="organizationsSearchForm" [includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter" - + [sort]="false" [filters]="filters" [simpleView]="simpleView" formPlaceholderText="Search by organization name..." > diff --git a/searchPages/searchProjects.component.ts b/searchPages/searchProjects.component.ts index 2999a3a7..0bdd9b57 100644 --- a/searchPages/searchProjects.component.ts +++ b/searchPages/searchProjects.component.ts @@ -32,6 +32,7 @@ import {RangeFilter} from "../utils/rangeFilter/rangeFilterHelperClasses.class"; [filters]="filters" [rangeFilters]="rangeFilters" [rangeFields]="rangeFields" [simpleView]="simpleView" formPlaceholderText="Search by title, acronym, project code..." + [sort]="false" > diff --git a/searchPages/searchResearchResults.component.ts b/searchPages/searchResearchResults.component.ts index 1ea53f2b..0485c04d 100644 --- a/searchPages/searchResearchResults.component.ts +++ b/searchPages/searchResearchResults.component.ts @@ -29,7 +29,6 @@ import {RangeFilter} from "../utils/rangeFilter/rangeFilterHelperClasses.class"; [openaireLink]=openaireLink [piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix" searchFormClass="publicationsSearchForm" - [sort]=sort [filters]="filters" [quickFilter]="quickFilter" [rangeFilters]="rangeFilters" [rangeFields]="rangeFields" [simpleView]="simpleView" formPlaceholderText="Search by title, author, abstract, DOI, orcid..." @@ -70,7 +69,6 @@ export class SearchResearchResultsComponent { @Input() customFilter: SearchCustomFilter = null; public pagingLimit: number = 0; public isPiwikEnabled; - public sort: boolean = true; properties: EnvProperties; public refineFields: string[] = this.searchFields.RESULT_REFINE_FIELDS; @ViewChild(NewSearchPageComponent) searchPage: NewSearchPageComponent; diff --git a/searchPages/searchUtils/newSearchPage.component.html b/searchPages/searchUtils/newSearchPage.component.html index 5ce62540..5bbb1dc3 100644 --- a/searchPages/searchUtils/newSearchPage.component.html +++ b/searchPages/searchUtils/newSearchPage.component.html @@ -373,7 +373,7 @@ class="uk-grid uk-margin-top uk-margin-bottom">
- +
diff --git a/searchPages/searchUtils/newSearchPage.component.ts b/searchPages/searchUtils/newSearchPage.component.ts index f598ebd2..b9636409 100644 --- a/searchPages/searchUtils/newSearchPage.component.ts +++ b/searchPages/searchUtils/newSearchPage.component.ts @@ -49,7 +49,7 @@ export class NewSearchPageComponent { @Input() oldTotalResults: number = 0; @Input() openaireLink: string; @Input() customFilter: SearchCustomFilter; - @Input() sort: boolean = false; + @Input() sort: boolean = true; @Input() searchFormClass: string = "searchForm"; //From simple: @Input() rangeFilters: RangeFilter[] = []; diff --git a/utils/subscribe/subscribe.service.ts b/utils/subscribe/subscribe.service.ts index a1fb393e..4f7b72ba 100644 --- a/utils/subscribe/subscribe.service.ts +++ b/utils/subscribe/subscribe.service.ts @@ -10,9 +10,7 @@ import {BehaviorSubject, Observable} from "rxjs"; export class SubscribeService { private isSubscribedSubject: BehaviorSubject = new BehaviorSubject(false); - constructor(private http: HttpClient) { - console.log("Subscribe service constructor"); - } + constructor(private http: HttpClient) {} public initIsSubscribedToCommunity(properties: EnvProperties, pid: string) { let url = properties.adminToolsAPIURL + "/community/" + pid + "/is-subscriber/"; @@ -58,14 +56,12 @@ export class SubscribeService { subscribeToCommunity(properties: EnvProperties, pid: string) { return this.http.post(properties.adminToolsAPIURL + "/community/" + pid + "/subscriber", {}, CustomOptions.getAuthOptionsWithBody()) .pipe(tap(isSubscribed => { - console.log("subscribe servive (subscribeToCommunity): isSubscribed: "+isSubscribed); this.isSubscribedSubject.next(isSubscribed);})); } unSubscribeToCommunity(properties: EnvProperties, pid: string) { return this.http.post(properties.adminToolsAPIURL + "/community/" + pid + "/subscriber/delete", {}, CustomOptions.getAuthOptionsWithBody()) .pipe(tap(unSubscribed => { - console.log("subscribe servive (unSubscribeToCommunity): isSubscribed: "+!unSubscribed); this.isSubscribedSubject.next(!unSubscribed);})); }