Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme
This commit is contained in:
commit
e39491e61e
|
@ -20,7 +20,8 @@
|
||||||
<div class="uk-text-meta">Top 100 values are shown in the filters</div>
|
<div class="uk-text-meta">Top 100 values are shown in the filters</div>
|
||||||
<div class="uk-flex uk-flex-bottom uk-margin-top">
|
<div class="uk-flex uk-flex-bottom uk-margin-top">
|
||||||
<div input class="uk-width-1-2@m uk-margin-right" [placeholder]="{label: 'Search', static: true}" inputClass="inner small" [(value)]="keyword"></div>
|
<div input class="uk-width-1-2@m uk-margin-right" [placeholder]="{label: 'Search', static: true}" inputClass="inner small" [(value)]="keyword"></div>
|
||||||
<div *ngIf="showResultCount === true" input type="select" class="uk-width-expand" placeholder="Sort by" inputClass="border-bottom" [(value)]="sortBy" [options]="sortByOptions"></div>
|
<div *ngIf="showResultCount === true" input type="select" class="uk-width-expand" placeholder="Sort by"
|
||||||
|
inputClass="border-bottom" [(value)]="sortBy" [options]="sortByOptions" (valueChange)="sort()"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-overflow-auto uk-height-max-small uk-margin-small-left uk-margin-small-right uk-margin-top">
|
<div class="uk-overflow-auto uk-height-max-small uk-margin-small-left uk-margin-small-right uk-margin-top">
|
||||||
|
|
|
@ -63,7 +63,7 @@ export class SearchFilterComponent implements OnInit, OnChanges {
|
||||||
this.paramPosition = SearchFields.getParameterOrder(this.filter.filterId, this.getEntries(params));
|
this.paramPosition = SearchFields.getParameterOrder(this.filter.filterId, this.getEntries(params));
|
||||||
});
|
});
|
||||||
this.filter.values = this.filter.values.filter(value => !value.name.toLowerCase().includes('unknown') && !value.name.toLowerCase().includes('not available'));
|
this.filter.values = this.filter.values.filter(value => !value.name.toLowerCase().includes('unknown') && !value.name.toLowerCase().includes('not available'));
|
||||||
this.sort(this.filter.values);
|
this.sort();
|
||||||
if (this.filter.filterType == "radio") {
|
if (this.filter.filterType == "radio") {
|
||||||
this.filter.radioValue = "";
|
this.filter.radioValue = "";
|
||||||
this.filter.values.forEach(value => {
|
this.filter.values.forEach(value => {
|
||||||
|
@ -229,8 +229,8 @@ export class SearchFilterComponent implements OnInit, OnChanges {
|
||||||
return notSselected;
|
return notSselected;
|
||||||
}
|
}
|
||||||
|
|
||||||
sort(values: Value[]) {
|
sort() {
|
||||||
let sorted: Value[] = values.slice();
|
let sorted: Value[] = this.filter.values.slice();
|
||||||
if (this.sortBy == "name") {
|
if (this.sortBy == "name") {
|
||||||
sorted.sort((n1, n2) => {
|
sorted.sort((n1, n2) => {
|
||||||
if (this.filter.filterId === "sdg") {
|
if (this.filter.filterId === "sdg") {
|
||||||
|
|
Loading…
Reference in New Issue