[Library|Trunk]

Filters: when filter title is long, fix to show the number of values

Stakeholder: add co-fundedFilter




git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59184 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2020-07-28 15:55:59 +00:00
parent 3fa328179c
commit 35bd177ca0
2 changed files with 4 additions and 2 deletions

View File

@ -205,7 +205,7 @@ export class IndicatorPath {
}
}
export type FilterType = "fundingL0"|"start_year" | "end_year";
export type FilterType = "fundingL0"|"start_year" | "end_year" | "co-funded";
export class IndicatorFilterUtils{
static getFilter(field: string, filterType:FilterType) {
if(["publication", "software", "dataset", "other", "result"].indexOf(field)!=-1){
@ -223,6 +223,8 @@ export class IndicatorFilterUtils{
return '{"groupFilters":[{"field":"' + dbType + '.year","type":">=","values":["' + ChartHelper.prefix + 'start_year' + ChartHelper.suffix + '"]}],"op":"AND"}';
} else if (filterType == "end_year") {
return '{"groupFilters":[{"field":"' + dbType + '.year","type":"<=","values":["' + ChartHelper.prefix + 'end_year' + ChartHelper.suffix + '"]}],"op":"AND"}';
}else if (filterType == "co-funded") {
return '{"groupFilters":[{"field":"' + dbType + '.No of funders","type":">","values":["1"]}],"op":"AND"}';
}
}
static getProjectFilter( filterType:FilterType) {

View File

@ -66,7 +66,7 @@ export class SearchFilterComponent implements OnInit, OnChanges{
}
public _formatTitle(title,length){
return (((title+" ("+length+")").length >this._maxCharacters)?(title.substring(0,(this._maxCharacters - (" ("+length+")").length - ('...').length))+"..."):title+" ("+(length>95?"100":length)+")")
return (((title+" ("+length+")").length >this._maxCharacters)?(title.substring(0,(this._maxCharacters - (" ("+length+")").length - ('...').length))+"..."):title)+" ("+(length>95?"100":length)+")";
}
public _formatName(value){
//let maxLineLength = 24;