[Trunk | Library]:
1. newSearchPage.component.ts: [Bug fix] 'lastIndex' input field was missing. 2. rangeFilter.component: [Bug fix] Add method 'stringToNum()' for 'filter.selectedFromValue' and 'filter.selectedToValue'. git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58268 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
44d73bae31
commit
3917ea8bb7
|
@ -72,6 +72,8 @@ export class NewSearchPageComponent {
|
|||
@Input() resultTypes = null;
|
||||
@Input() quickFilter: { filter: Filter, selected: boolean, filterId: string, value: string };
|
||||
@Input() includeOnlyResultsAndFilter:boolean = false;
|
||||
@Input() lastIndex: boolean = true;
|
||||
|
||||
piwiksub: any;
|
||||
public parameterNames: string[] = [];
|
||||
public parameterValues: string[] = [];
|
||||
|
|
|
@ -42,15 +42,15 @@
|
|||
<div class="range-button uk-button-group uk-margin-small-top">
|
||||
<!-- padding: 0 25px;-->
|
||||
<button [class]="'uk-button uk-button-default uk-button-small uk-text-small'
|
||||
+ ((filter.selectedFromValue == currentYear && filter.selectedToValue == currentYear) ? ' uk-text-bold' : '')"
|
||||
+ ((stringToNum(filter.selectedFromValue) == currentYear && stringToNum(filter.selectedToValue) == currentYear) ? ' uk-text-bold' : '')"
|
||||
(click)="yearChanged(0)">This year
|
||||
</button>
|
||||
<button [class]="'uk-button uk-button-default uk-button-small uk-text-small'
|
||||
+ ((filter.selectedToValue == currentYear && filter.selectedFromValue == currentYear-5) ? ' uk-text-bold' : '')"
|
||||
+ ((stringToNum(filter.selectedToValue) == currentYear && stringToNum(filter.selectedFromValue) == currentYear-5) ? ' uk-text-bold' : '')"
|
||||
(click)="yearChanged(5)">Last 5 years
|
||||
</button>
|
||||
<button [class]="'uk-button uk-button-default uk-button-small uk-text-small'
|
||||
+ ((filter.selectedToValue == currentYear && filter.selectedFromValue == currentYear-10) ? ' uk-text-bold' : '')"
|
||||
+ ((stringToNum(filter.selectedToValue) == currentYear && stringToNum(filter.selectedFromValue) == currentYear-10) ? ' uk-text-bold' : '')"
|
||||
|
||||
(click)="yearChanged(10)">Last 10 years
|
||||
</button>
|
||||
|
|
|
@ -49,4 +49,8 @@ export class RangeFilterComponent {
|
|||
let name = value.name +" ("+ value.number.format()+")";
|
||||
return name;
|
||||
}
|
||||
|
||||
stringToNum(value: string): number {
|
||||
return +(value);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue