[Library | Trunk]

Search:
-fix: remove selected type filter did nothing
-fix: weird margin for selected filters



git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60224 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2021-01-13 14:28:37 +00:00
parent 69698b95b9
commit 6f76ccd97b
2 changed files with 12 additions and 7 deletions

View File

@ -3,7 +3,7 @@
<ng-container *ngIf="customFilter && ((customFilterEnabled &&
refineFields.indexOf(customFilter.queryFieldName) ==
-1) ||customFilter.isHiddenFilter)">
<span class="uk-grid-margin">
<span class=" uk-margin-small-bottom">
<span class="selectedFilterLabel customFilterLabel">
<span class="">{{customFilter.valueName}}</span>
</span>
@ -13,7 +13,8 @@
<ng-container *ngFor="let type of resultTypes.values; let i = index; let end = last; ">
<ng-container *ngIf="type.selected">
<span [title]="'Remove '+ type.name" (click)="removeResultType(type.id) "
[class]="((disableForms || disableRefineForms) ? 'uk-disabled' : 'clickable') + ' uk-grid-margin'">
[class]="((disableForms || disableRefineForms) ? 'uk-disabled' : 'clickable') +
' uk-margin-small-bottom'">
<span class="selectedFilterLabel ">
<a class="uk-link-text">
<span aria-hidden="true">
@ -34,7 +35,8 @@
<ng-container *ngFor="let filter of rangeFilters ">
<ng-container *ngIf="filter.selectedFromAndToValues">
<span [title]="'Remove '+ filter.selectedFromAndToValues" (click)="removeRangeFilter(filter) "
[class]="((disableForms || disableRefineForms) ? 'uk-disabled' : 'clickable') + ' uk-grid-margin'">
[class]="((disableForms || disableRefineForms) ? 'uk-disabled' : 'clickable') +
' uk-margin-small-bottom'">
<span class="selectedFilterLabel ">
<a class="uk-link-text">
<span aria-hidden="true">
@ -60,7 +62,7 @@
<span *ngIf="!customFilter || (customFilter.isHiddenFilter && customFilter.valueId != value.id)"
[title]="'Remove '+value.name"
(click)="removeFilter(value, filter) "
[class]="((disableForms || disableRefineForms) ? 'uk-disabled' : 'clickable') + ' uk-grid-margin'">
[class]="((disableForms || disableRefineForms) ? 'uk-disabled' : 'clickable') + ' uk-margin-bottom'">
<!-- if no grid on the div above, remove it and move class 'selectedFilterLabel' on top span -->
<span class="selectedFilterLabel ">
<a class="uk-link-text">

View File

@ -1573,9 +1573,12 @@ public static createRangeFilterQuery(rangeField,selectedFromValue, selectedToVal
}
removeResultType(type){
if(this.resultTypes && this.resultTypes[type]){
this.resultTypes[type]=false;
this.goTo(1);
for(let value of this.resultTypes.values){
if(type == value.id && value.selected){
value.selected = false;
this.goTo(1);
break;
}
}
}
}