[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:
parent
3fa328179c
commit
35bd177ca0
|
@ -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{
|
export class IndicatorFilterUtils{
|
||||||
static getFilter(field: string, filterType:FilterType) {
|
static getFilter(field: string, filterType:FilterType) {
|
||||||
if(["publication", "software", "dataset", "other", "result"].indexOf(field)!=-1){
|
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"}';
|
return '{"groupFilters":[{"field":"' + dbType + '.year","type":">=","values":["' + ChartHelper.prefix + 'start_year' + ChartHelper.suffix + '"]}],"op":"AND"}';
|
||||||
} else if (filterType == "end_year") {
|
} else if (filterType == "end_year") {
|
||||||
return '{"groupFilters":[{"field":"' + dbType + '.year","type":"<=","values":["' + ChartHelper.prefix + 'end_year' + ChartHelper.suffix + '"]}],"op":"AND"}';
|
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) {
|
static getProjectFilter( filterType:FilterType) {
|
||||||
|
|
|
@ -66,7 +66,7 @@ export class SearchFilterComponent implements OnInit, OnChanges{
|
||||||
}
|
}
|
||||||
|
|
||||||
public _formatTitle(title,length){
|
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){
|
public _formatName(value){
|
||||||
//let maxLineLength = 24;
|
//let maxLineLength = 24;
|
||||||
|
|
Loading…
Reference in New Issue