[EOSC Explore]: package.json & CHANGELOG.md: Updated v1.0.2 | newSearchPage.component.html: Updated margins and paddings in search form | advancedSearchForm.component: Bug fix in advanced search form (fixed in angular 14) & smooth scroll to the last rule when adding new.
This commit is contained in:
parent
95152eef04
commit
4734c7b821
|
@ -19,14 +19,14 @@
|
|||
<button type="submit" class="uk-hidden"></button>
|
||||
<div class="uk-grid uk-grid-small uk-grid-divider uk-flex-between" uk-grid>
|
||||
<div class="uk-width-expand">
|
||||
<div class="uk-padding-small uk-padding-remove-left uk-overflow-auto" style="height: 200px; overflow-x: hidden; direction: rtl; scrollbar-gutter: stable;">
|
||||
<div #container class="uk-padding-small uk-padding-remove-left uk-overflow-auto" style="height: 150px; overflow-x: hidden; direction: rtl; scrollbar-gutter: stable;">
|
||||
<div style="direction: ltr;">
|
||||
<table class="uk-table uk-text-small uk-table-responsive uk-table-small uk-margin-remove">
|
||||
<tr>
|
||||
<td class="uk-text-bold uk-text-uppercase uk-width-1-3">Searching Fields</td>
|
||||
<td class="uk-text-bold uk-text-uppercase uk-width-2-5">Terms</td>
|
||||
</tr>
|
||||
<tr *ngFor="let selectedField of selectedFields; let i = index">
|
||||
<tr *ngFor="let selectedField of selectedFields; let i = index; trackBy: trackByFn">
|
||||
<td>
|
||||
<div class="uk-grid uk-flex-middle uk-child-width-1-2@m uk-child-width-1-1">
|
||||
<div input [(value)]="selectedField.id" inputClass="border-bottom"
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
OnDestroy,
|
||||
OnInit,
|
||||
Output,
|
||||
SimpleChanges
|
||||
SimpleChanges, ViewChild
|
||||
} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
|
||||
|
@ -25,6 +25,7 @@ import {Option} from "../../sharedComponents/input/input.component";
|
|||
templateUrl: 'advancedSearchForm.component.html'
|
||||
})
|
||||
export class AdvancedSearchFormComponent implements OnInit, OnDestroy, OnChanges {
|
||||
@ViewChild("container") container;
|
||||
@Input() entityType;
|
||||
@Input() fieldIds: string[];
|
||||
@Input() fieldIdsMap;
|
||||
|
@ -157,7 +158,9 @@ export class AdvancedSearchFormComponent implements OnInit, OnDestroy, OnChanges
|
|||
} else {
|
||||
this.selectedFields.push(new AdvancedField(this.newFieldId, this.fieldIdsMap[this.newFieldId].param, this.fieldIdsMap[this.newFieldId].name, type, "", "and"));
|
||||
}
|
||||
|
||||
|
||||
this.cdr.detectChanges();
|
||||
this.container.nativeElement.scrollTo({top: this.container.nativeElement.scrollHeight, behavior: 'smooth'});
|
||||
}
|
||||
|
||||
removeField(index: number) {
|
||||
|
@ -210,4 +213,8 @@ export class AdvancedSearchFormComponent implements OnInit, OnDestroy, OnChanges
|
|||
onlyIncludesSupported(index: number) {
|
||||
return (this.selectedFields[index] && this.selectedFields[index].operatorId === 'or') || (this.selectedFields[index+1] && this.selectedFields[index+1].operatorId === 'or')
|
||||
}
|
||||
|
||||
trackByFn(index, item) {
|
||||
return item.id;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,10 +121,10 @@
|
|||
[attr.uk-sticky]="(stickyForm?'{animation:false;offset:100;top:90;cls-active:uk-active uk-sticky-below;cls-inactive:uk-sticky '+
|
||||
(usedBy != 'deposit' && usedBy != 'orcid' && (!customFilter || customFilter.queryFieldName != 'communityId') ?
|
||||
' uk-position-relative ' :(' uk-section ' ))+'}':null)">
|
||||
<div class="uk-background-norepeat uk-background-bottom-center uk-padding-remove-bottom uk-section uk-section-small" [ngClass]="searchForm.class">
|
||||
<div class="uk-background-norepeat uk-background-bottom-center" [ngClass]="searchForm.class">
|
||||
<div class="uk-width-1-1">
|
||||
<div *ngIf="showBreadcrumb" class="uk-container uk-container-large" [class.uk-light]="searchForm.dark">
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||
<div class="uk-margin-top">
|
||||
<breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -132,7 +132,7 @@
|
|||
<div class="uk-container uk-section uk-section-small uk-margin-bottom" id="searchForm">
|
||||
<div class="uk-grid uk-flex uk-flex-middle uk-flex-center" uk-grid>
|
||||
<div [class]="'uk-width-1-1'+(simpleView?' uk-width-auto@m' : '')"><div id="searchImage"></div></div>
|
||||
<advanced-search-form class="uk-width-expand uk-padding uk-padding-remove-vertical"
|
||||
<advanced-search-form class="uk-width-expand uk-padding-remove-vertical"
|
||||
[entityType]="entityType"
|
||||
[fieldIds]="fieldIds"
|
||||
[fieldIdsMap]="fieldIdsMap"
|
||||
|
@ -156,7 +156,8 @@
|
|||
</div>
|
||||
<schema2jsonld *ngIf="url" [URL]="url" type="search" [name]=pageTitleWithFilters
|
||||
[searchAction]=false [description]="metaDescription"></schema2jsonld>
|
||||
<div id="tm-main" [class.uk-margin-medium-top]="!includeOnlyResultsAndFilter" [class.uk-margin-top]="stickyForm">
|
||||
<div id="tm-main" [class.uk-margin-medium-top]="!includeOnlyResultsAndFilter && properties.adminToolsPortalType != 'eosc'"
|
||||
[class.uk-margin-top]="stickyForm || properties.adminToolsPortalType == 'eosc'">
|
||||
<ng-template #loading>
|
||||
<loading [ngClass]="'uk-height-medium uk-display-block uk-margin-xlarge-top'"></loading>
|
||||
</ng-template>
|
||||
|
@ -212,7 +213,7 @@
|
|||
search
|
||||
</a>
|
||||
</div>
|
||||
<div class="uk-grid uk-margin-large-top uk-margin-large-bottom" uk-grid>
|
||||
<div class="uk-grid uk-margin-medium-top uk-margin-large-bottom" uk-grid>
|
||||
<div *ngIf="showRefine && (results.length > 0
|
||||
|| (searchUtils.refineStatus == errorCodes.LOADING && searchUtils.status != errorCodes.LOADING)
|
||||
|| (!hideFilters &&
|
||||
|
|
Loading…
Reference in New Issue