@@ -33,7 +39,7 @@ import {ActivatedRoute} from '@angular/router';
No title available
-
+
`
})
@@ -43,6 +49,7 @@ export class ShowTitleComponent {
@Input() title: { [key: string]: string };
@Input() iconClass:string;
@Input() classNames: string = "";
+ @Input() isH1:boolean = true;
constructor () {}
diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html
index c39facaa..18bd070c 100644
--- a/landingPages/result/resultLanding.component.html
+++ b/landingPages/result/resultLanding.component.html
@@ -506,7 +506,8 @@
[subTitle]="resultLandingInfo.subtitle" [authorLimit]="10" [showAllAuthors]="false"
titleClass="title-grey-background"
[entityType]="getTypeName()" [authors]="resultLandingInfo.authors" [types]="resultLandingInfo.types"
- [year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate">
+ [year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate"
+ [isTitleH1]="false">
{
this.loadPaging = true;
if(params['page'] && this.searchUtils.page != params['page']) {
@@ -148,6 +147,7 @@ export class SearchDataProvidersComponent {
this._getFilters(this.searchPage.getSearchAPIQueryForAdvancedSearhFields(), this.searchUtils.page, 0, true, this.searchPage.getSearchAPIQueryForRefineFields(params, firstLoad));
} else if(refine) { // static filters
this.searchUtils.refineStatus = this.errorCodes.LOADING;
+ this.filters = DatasourcesHelperClass.createFilters(this.type);
} else {
this.searchUtils.refineStatus = this.errorCodes.DONE;
}
@@ -256,6 +256,9 @@ export class SearchDataProvidersComponent {
data => {
let totalResults = data[0];
let results = data[1];
+ if(refine && !(this.type == "all" || this.type == "deposit")){
+ this.filtersReturned(refine, this.filters, totalResults, page);
+ }
this.resultsReturned(refine, results, totalResults, page);
this.searchPageUpdates.emit({disableForms: this.disableForms, disableRefineForms: this.disableRefineForms, searchUtils: this.searchUtils});
},
diff --git a/searchPages/searchUtils/searchFilter.component.ts b/searchPages/searchUtils/searchFilter.component.ts
index c83654d6..9510c118 100644
--- a/searchPages/searchUtils/searchFilter.component.ts
+++ b/searchPages/searchUtils/searchFilter.component.ts
@@ -249,14 +249,14 @@ export class SearchFilterComponent implements OnInit, OnChanges{
params['qf']="false";
qf=true;
}
- if(params[filter.filterId] && params[filter.filterId].indexOf(encodeURIComponent(value.id))==-1 && !qf) {
+ if(params[filter.filterId] && this.checkIfValueIndexOf(params[filter.filterId].split(','),value.id)==-1 && !qf) {
//has other values of this filter --> add this value
params[filter.filterId] = params[filter.filterId] + ',' + '"' + encodeURIComponent(value.id) + '"';
- }else if(params[filter.filterId] && params[filter.filterId].indexOf(encodeURIComponent(value.id))!=-1) {
+ }else if(params[filter.filterId] && this.checkIfValueIndexOf(params[filter.filterId].split(','),value.id)!=-1) {
// has this filter and the value -- > remove it
let values = params[filter.filterId].split(',');
- values.splice(values.indexOf('"' + encodeURIComponent(value.id)+'"'), 1);
+ values.splice(this.checkIfValueIndexOf(values,value.id), 1);
params[filter.filterId] =values.join(',');
if(values.length == 0){
delete params[filter.filterId];
@@ -268,4 +268,14 @@ export class SearchFilterComponent implements OnInit, OnChanges{
delete params['page'];
return params;
}
+ checkIfValueIndexOf(array, value){
+ let encodedValue = encodeURIComponent(value);
+ if(array.indexOf(encodedValue)!=-1){
+ return array.indexOf(encodedValue);
+ }
+ if(array.indexOf('"'+encodedValue+'"')!=-1){
+ return array.indexOf('"'+encodedValue+'"');
+ }
+ return -1;
+ }
}