[Library|Trunk]
Search Page: add sticky option for search form git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59286 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
33424ff671
commit
6b19edafca
|
@ -53,7 +53,7 @@ export class AddThisComponent implements OnInit {
|
|||
}
|
||||
}
|
||||
}catch (e) {
|
||||
console.error(e)
|
||||
// console.error(e)
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -458,7 +458,6 @@ export class SearchAllComponent {
|
|||
activeEntityUpdate($event) {
|
||||
this.disableForms = $event.disableForms;
|
||||
let updated = true
|
||||
console.debug($event)
|
||||
if (this.activeEntity == "result") {
|
||||
if($event.searchUtils.status!=this.errorCodes.LOADING) {
|
||||
this.fetchPublications.searchUtils.totalResults = $event.searchUtils.totalResults;
|
||||
|
|
|
@ -36,6 +36,7 @@ import {properties} from "../../../environments/environment";
|
|||
[simpleView]="simpleView" formPlaceholderText="Search by title, author, abstract, DOI, orcid..."
|
||||
[includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter" [showBreadcrumb]="showBreadcrumb"
|
||||
[showSwitchSearchLink]="showSwitchSearchLink"
|
||||
[stickyForm]="stickyForm"
|
||||
>
|
||||
</new-search-page>
|
||||
|
||||
|
@ -88,7 +89,7 @@ export class SearchResearchResultsComponent {
|
|||
@Output() searchPageUpdates = new EventEmitter();
|
||||
@Input() showSwitchSearchLink: boolean = true;
|
||||
subs: any[] = [];
|
||||
|
||||
@Input() stickyForm:boolean = false;
|
||||
constructor(private route: ActivatedRoute, private _searchResearchResultsService: SearchResearchResultsService) {
|
||||
this.results = [];
|
||||
this.errorCodes = new ErrorCodes();
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
[routerLink]=simpleSearchLink style="z-index:1;"
|
||||
[class]="(isDisabled)?'uk-float-right uk-disabled uk-link-muted portal-link uk-margin-right ':'uk-float-right portal-link uk-margin-right '">Quick search
|
||||
</a>
|
||||
<h1 class="uk-h5 uk-margin-small-bottom">
|
||||
<div class="uk-h5 uk-margin-small-bottom">
|
||||
Advanced search in
|
||||
<entities-selection [simpleView]="false" [currentEntity]="entityType"
|
||||
[properties]="properties" [customFilter]="customFilter" ></entities-selection>
|
||||
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<form *ngIf="!simpleView"
|
||||
[class]="((isDisabled )?'uk-disabled ':'')
|
||||
|
|
|
@ -143,11 +143,15 @@
|
|||
|
||||
|
||||
<div *ngIf="!includeOnlyResultsAndFilter" [class]="usedBy != 'deposit' && (!customFilter || customFilter.queryFieldName != 'communityId') ?
|
||||
' image-front-topbar uk-position-relative ' :
|
||||
(' uk-section uk-padding-remove-bottom uk-padding-remove-top ' + (usedBy
|
||||
' image-front-topbar ' + (stickyForm?'':' uk-position-relative ') :
|
||||
(+ (stickyForm?'':' uk-section') +' uk-padding-remove-bottom uk-padding-remove-top ' + (usedBy
|
||||
|
||||
== 'deposit' ? ' uk-padding-remove-top ' : ' '))"
|
||||
uk-scrollspy="{"target":"[uk-scrollspy-class]","cls":"uk-animation-fade","delay":false}"
|
||||
tm-header-transparent="light">
|
||||
[attr.uk-sticky]="(stickyForm?'{animation:false;offset:100;top:90;cls-active:uk-active uk-sticky-below;cls-inactive:uk-sticky '+(usedBy !=
|
||||
'deposit' && (!customFilter || customFilter.queryFieldName != 'communityId') ?
|
||||
' uk-position-relative ' :(' uk-section ' ))+'}':null)"
|
||||
uk-scrollspy="{"target":"[uk-scrollspy-class]","cls":"uk-animation-fade","delay":false}"
|
||||
tm-header-transparent="light" id="searchFormPanel" >
|
||||
<div style="box-sizing: border-box; "
|
||||
[class]="' uk-background-norepeat uk-background-bottom-center uk-padding-remove-bottom uk-flex uk-flex-middle uk-background-fixed '+searchFormClass
|
||||
+ (usedBy != 'deposit' && (!customFilter || customFilter.queryFieldName != 'communityId') && !dashboard ?
|
||||
|
@ -162,7 +166,7 @@
|
|||
[breadcrumbs]="breadcrumbs"></breadcrumbs>
|
||||
<div class="uk-position-relative">
|
||||
<div [class]="'uk-container '+(customFilter && customFilter.queryFieldName ==
|
||||
'communityId'?' uk-margin-large-bottom ':'uk-margin-large-top')+
|
||||
'communityId'?' uk-margin-large-bottom ':'uk-margin-top')+
|
||||
(entityType === 'community' ||entityType === 'stakeholder'?' uk-position-relative':'')" id="searchForm">
|
||||
<advanced-search-form
|
||||
[entityType]="entityType"
|
||||
|
@ -192,7 +196,7 @@
|
|||
[searchAction]=false [description]="metaDescription" ></schema2jsonld>
|
||||
|
||||
|
||||
<div id="tm-main" class=" tm-middle">
|
||||
<div id="tm-main" class=" tm-middle" [class.uk-margin-top]="stickyForm">
|
||||
<div uk-grid>
|
||||
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
|
||||
<!-- <breadcrumbs *ngIf="showBreadcrumb && entityType!='community'"-->
|
||||
|
|
|
@ -114,6 +114,9 @@ export class NewSearchPageComponent {
|
|||
//Dashboard
|
||||
filterToggle = false;
|
||||
customFilterEnabled:boolean = false;
|
||||
//stickyform
|
||||
@Input() stickyForm:boolean = false;
|
||||
|
||||
@ViewChild('removeCustomFilter') removeCustomFilter: AlertModal;
|
||||
currentValueToRemove;
|
||||
currentFilterToRemove;
|
||||
|
|
Loading…
Reference in New Issue