Add focus next in home page search and activate dropdown when search is focused
This commit is contained in:
parent
9bf87f1f74
commit
11567b2593
|
@ -27,13 +27,13 @@
|
||||||
<div class="uk-text-primary">All linked together through citations and semantics.</div>
|
<div class="uk-text-primary">All linked together through citations and semantics.</div>
|
||||||
</div>
|
</div>
|
||||||
<div [class.uk-invisible]="disableSelect" class="uk-margin-medium-top uk-width-4-5@l uk-width-3-5@xl">
|
<div [class.uk-invisible]="disableSelect" class="uk-margin-medium-top uk-width-4-5@l uk-width-3-5@xl">
|
||||||
<advanced-search-input (searchEmitter)="goTo(true)">
|
<advanced-search-input #advanced (searchEmitter)="goTo(true)">
|
||||||
<entities-selection #entities [simpleView]="true" currentEntity="all" [selectedEntity]="selectedEntity"
|
<entities-selection #entities [simpleView]="true" currentEntity="all" [selectedEntity]="selectedEntity"
|
||||||
(selectionChange)="entityChanged($event)" (disableSelectEmitter)="disableSelectChange($event)"
|
(selectionChange)="entityChanged($event);advanced.focusNext(input, $event)" (disableSelectEmitter)="disableSelectChange($event)"
|
||||||
[onChangeNavigate]="false"></entities-selection>
|
[onChangeNavigate]="false"></entities-selection>
|
||||||
<div input placeholder="Scholary works" [hint]="'Search in OpenAIRE'" [(value)]="keyword"></div>
|
<div input #input placeholder="Scholary works" [hint]="'Search in OpenAIRE'" [(value)]="keyword"></div>
|
||||||
</advanced-search-input>
|
</advanced-search-input>
|
||||||
<div *ngIf="selectedEntity === 'result' && !entities.input.focused" class="uk-dropdown uk-display-block uk-margin-small-top uk-width-auto">
|
<div *ngIf="selectedEntity === 'result' && input.focused" class="uk-dropdown uk-display-block uk-margin-small-top uk-width-auto">
|
||||||
<div class="uk-padding-small">
|
<div class="uk-padding-small">
|
||||||
<quick-selections [resultTypes]="resultTypes" [quickFilter]="resultsQuickFilter"></quick-selections>
|
<quick-selections [resultTypes]="resultTypes" [quickFilter]="resultsQuickFilter"></quick-selections>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -9,7 +9,7 @@ import {
|
||||||
ViewChild,
|
ViewChild,
|
||||||
ViewChildren
|
ViewChildren
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import {Observable, of, Subscriber, zip} from 'rxjs';
|
import {of, Subscriber, zip} from 'rxjs';
|
||||||
import {ActivatedRoute, Router} from '@angular/router';
|
import {ActivatedRoute, Router} from '@angular/router';
|
||||||
import {Location} from '@angular/common';
|
import {Location} from '@angular/common';
|
||||||
import {Meta, Title} from '@angular/platform-browser';
|
import {Meta, Title} from '@angular/platform-browser';
|
||||||
|
@ -261,13 +261,28 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit{
|
||||||
this.showDataProviders = !!showEntity["datasource"];
|
this.showDataProviders = !!showEntity["datasource"];
|
||||||
this.showOrganizations = !!showEntity["organization"];
|
this.showOrganizations = !!showEntity["organization"];
|
||||||
if (this.showPublications) {
|
if (this.showPublications) {
|
||||||
this.resultTypes.values.push({name: this.openaireEntities.PUBLICATIONS, id: "publications", selected: false, number: 0});
|
this.resultTypes.values.push({
|
||||||
|
name: this.openaireEntities.PUBLICATIONS,
|
||||||
|
id: "publications",
|
||||||
|
selected: false,
|
||||||
|
number: 0
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if (this.showDatasets) {
|
if (this.showDatasets) {
|
||||||
this.resultTypes.values.push({name: this.openaireEntities.DATASETS, id: "datasets", selected: false, number: 0});
|
this.resultTypes.values.push({
|
||||||
|
name: this.openaireEntities.DATASETS,
|
||||||
|
id: "datasets",
|
||||||
|
selected: false,
|
||||||
|
number: 0
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if (this.showSoftware) {
|
if (this.showSoftware) {
|
||||||
this.resultTypes.values.push({name: this.openaireEntities.SOFTWARE, id: "software", selected: false, number: 0});
|
this.resultTypes.values.push({
|
||||||
|
name: this.openaireEntities.SOFTWARE,
|
||||||
|
id: "software",
|
||||||
|
selected: false,
|
||||||
|
number: 0
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if (this.showOrp) {
|
if (this.showOrp) {
|
||||||
this.resultTypes.values.push({name: this.openaireEntities.OTHER, id: "other", selected: false, number: 0});
|
this.resultTypes.values.push({name: this.openaireEntities.OTHER, id: "other", selected: false, number: 0});
|
||||||
|
@ -283,7 +298,6 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public ngOnDestroy() {
|
public ngOnDestroy() {
|
||||||
this.clear();
|
this.clear();
|
||||||
}
|
}
|
||||||
|
@ -361,6 +375,7 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit{
|
||||||
}
|
}
|
||||||
this._router.navigate([url], {queryParams: this.routerHelper.createQueryParams(parameterNames, parameterValues)});
|
this._router.navigate([url], {queryParams: this.routerHelper.createQueryParams(parameterNames, parameterValues)});
|
||||||
}
|
}
|
||||||
|
|
||||||
getSubjectParameter(param) {
|
getSubjectParameter(param) {
|
||||||
return {'f0': 'resultsubject', 'fv0': '"' + (param) + '"', size: 50};
|
return {'f0': 'resultsubject', 'fv0': '"' + (param) + '"', size: 50};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit b0c9ee3736c841087538cd0456dac20233969da3
|
Subproject commit 7ef6ae148150348c5deafd03c6c5cd53869dbda2
|
|
@ -1 +1 @@
|
||||||
Subproject commit a071d1f9bb6131282f69c314f94f6d94f7c85286
|
Subproject commit 46e2d2d0ce2ea045c627fa676e555dade9247620
|
Loading…
Reference in New Issue