Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme
This commit is contained in:
commit
8a64b576d0
|
@ -112,6 +112,16 @@ export class RelatedDatasourcesTabComponent {
|
||||||
|
|
||||||
updatePage($event) {
|
updatePage($event) {
|
||||||
this.page = $event.value;
|
this.page = $event.value;
|
||||||
|
this.scrollToTabTop("relatedDatasources");
|
||||||
|
}
|
||||||
|
|
||||||
|
scrollToTabTop(tabId:string){
|
||||||
|
setTimeout(() => {
|
||||||
|
window.scrollTo({
|
||||||
|
top: document.getElementById(tabId) ? document.getElementById(tabId).offsetTop - 250 : 250,
|
||||||
|
behavior: 'smooth'
|
||||||
|
});
|
||||||
|
}, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getKeys( map) {
|
public getKeys( map) {
|
||||||
|
|
|
@ -56,7 +56,7 @@ import {AlertModal} from "../../../utils/modal/alert";
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="authors">
|
<div *ngIf="authors">
|
||||||
<showAuthors [authorsLimit]="authorLimit" [modal]="modal" [showAll]="showAllAuthors" [authors]="authors"></showAuthors>
|
<showAuthors [authorsLimit]="authorLimit" [modal]="modal" [showAll]="showAllAuthors" [authors]="authors" [isSticky]="isSticky"></showAuthors>
|
||||||
</div>
|
</div>
|
||||||
</div>`
|
</div>`
|
||||||
})
|
})
|
||||||
|
|
|
@ -34,7 +34,7 @@ import {OpenaireEntities} from '../../utils/properties/searchFields';
|
||||||
<errorMessages [status]="[fetchProjects.searchUtils.status]" [type]="openaireEntities.PROJECTS"
|
<errorMessages [status]="[fetchProjects.searchUtils.status]" [type]="openaireEntities.PROJECTS"
|
||||||
tab_error_class=true></errorMessages>
|
tab_error_class=true></errorMessages>
|
||||||
<div *ngIf="fetchProjects.searchUtils.status == errorCodes.DONE">
|
<div *ngIf="fetchProjects.searchUtils.status == errorCodes.DONE">
|
||||||
<results-and-pages *ngIf="fetchProjects.searchUtils.totalResults > size" [type]="openaireEntities.PROJECTS"
|
<results-and-pages [type]="openaireEntities.PROJECTS"
|
||||||
[page]="page" [pageSize]="size"
|
[page]="page" [pageSize]="size"
|
||||||
[totalResults]="fetchProjects.searchUtils.totalResults">
|
[totalResults]="fetchProjects.searchUtils.totalResults">
|
||||||
</results-and-pages>
|
</results-and-pages>
|
||||||
|
@ -84,6 +84,7 @@ export class ProjectsInModalComponent {
|
||||||
private search(refine: boolean, filterQuery: string) {
|
private search(refine: boolean, filterQuery: string) {
|
||||||
var refineFields: string [] = ["funder"];
|
var refineFields: string [] = ["funder"];
|
||||||
this.fetchProjects.getResultsForOrganizations(this.organizationId, filterQuery, this.page, this.size, (refine) ? refineFields : [], this.properties);
|
this.fetchProjects.getResultsForOrganizations(this.organizationId, filterQuery, this.page, this.size, (refine) ? refineFields : [], this.properties);
|
||||||
|
this.scrollToTabTop("projects");
|
||||||
}
|
}
|
||||||
|
|
||||||
public pageChange($event) {
|
public pageChange($event) {
|
||||||
|
@ -91,7 +92,17 @@ export class ProjectsInModalComponent {
|
||||||
this.search(false, this.filterQuery);
|
this.search(false, this.filterQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
scrollToTabTop(tabId:string){
|
||||||
|
setTimeout(() => {
|
||||||
|
window.scrollTo({
|
||||||
|
top: document.getElementById(tabId) ? document.getElementById(tabId).offsetTop - 250 : 250,
|
||||||
|
behavior: 'smooth'
|
||||||
|
});
|
||||||
|
}, 200);
|
||||||
|
}
|
||||||
|
|
||||||
public filterChange($event) {
|
public filterChange($event) {
|
||||||
|
this.page = 1;
|
||||||
this.updateFilters();
|
this.updateFilters();
|
||||||
//this.search(true, this.filterQuery);
|
//this.search(true, this.filterQuery);
|
||||||
this.search(false, this.filterQuery);
|
this.search(false, this.filterQuery);
|
||||||
|
|
|
@ -12,26 +12,29 @@ import {ResultPreview} from "../../../utils/result-preview/result-preview";
|
||||||
import {AlertModal} from "../../../utils/modal/alert";
|
import {AlertModal} from "../../../utils/modal/alert";
|
||||||
import {Subscriber} from "rxjs";
|
import {Subscriber} from "rxjs";
|
||||||
import {properties} from "../../../../../environments/environment";
|
import {properties} from "../../../../../environments/environment";
|
||||||
|
import {HelperFunctions} from "../../../utils/HelperFunctions.class";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'organizationsDeletedByInference',
|
selector: 'organizationsDeletedByInference',
|
||||||
template: `
|
template: `
|
||||||
<errorMessages [status]="[status]" [type]="type" tab_error_class=true></errorMessages>
|
<div id="versions_container">
|
||||||
<no-load-paging *ngIf="results.length > pageSize" [type]="type"
|
<errorMessages [status]="[status]" [type]="type" tab_error_class=true></errorMessages>
|
||||||
(pageChange)="updatePage($event)"
|
<no-load-paging *ngIf="results.length > pageSize" [type]="type"
|
||||||
[page]="page" [pageSize]="pageSize"
|
(pageChange)="updatePage($event)"
|
||||||
[totalResults]="results.length">
|
[page]="page" [pageSize]="pageSize"
|
||||||
</no-load-paging>
|
[totalResults]="results.length">
|
||||||
<ul class="uk-list uk-list-divider uk-margin">
|
</no-load-paging>
|
||||||
<li *ngFor="let result of results.slice((page-1)*pageSize, page*pageSize)">
|
<ul class="uk-list uk-list-divider uk-margin">
|
||||||
<result-preview [modal]="modal" [properties]="properties" [hasLink]="false" [result]="getResultPreview(result)" [isCard]="false"></result-preview>
|
<li *ngFor="let result of results.slice((page-1)*pageSize, page*pageSize)">
|
||||||
</li>
|
<result-preview [modal]="modal" [properties]="properties" [hasLink]="false" [result]="getResultPreview(result)" [isCard]="false"></result-preview>
|
||||||
</ul>
|
</li>
|
||||||
<no-load-paging *ngIf="results.length > pageSize" [type]="type"
|
</ul>
|
||||||
(pageChange)="updatePage($event)"
|
<no-load-paging *ngIf="results.length > pageSize" [type]="type"
|
||||||
[page]="page" [pageSize]="pageSize"
|
(pageChange)="updatePage($event)"
|
||||||
[totalResults]="results.length">
|
[page]="page" [pageSize]="pageSize"
|
||||||
</no-load-paging>
|
[totalResults]="results.length">
|
||||||
|
</no-load-paging>
|
||||||
|
</div>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
export class OrganizationsDeletedByInferenceComponent {
|
export class OrganizationsDeletedByInferenceComponent {
|
||||||
|
@ -111,5 +114,6 @@ export class OrganizationsDeletedByInferenceComponent {
|
||||||
|
|
||||||
public updatePage($event) {
|
public updatePage($event) {
|
||||||
this.page = $event.value;
|
this.page = $event.value;
|
||||||
|
HelperFunctions.scrollToId("versions_container");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,26 +12,29 @@ import {ResultPreview} from "../../../utils/result-preview/result-preview";
|
||||||
import {AlertModal} from "../../../utils/modal/alert";
|
import {AlertModal} from "../../../utils/modal/alert";
|
||||||
import {Subscriber} from "rxjs";
|
import {Subscriber} from "rxjs";
|
||||||
import {properties} from "../../../../../environments/environment";
|
import {properties} from "../../../../../environments/environment";
|
||||||
|
import {HelperFunctions} from "../../../utils/HelperFunctions.class";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'deletedByInference',
|
selector: 'deletedByInference',
|
||||||
template: `
|
template: `
|
||||||
<errorMessages [status]="[status]" [type]="type" tab_error_class=true></errorMessages>
|
<div id="versions_container">
|
||||||
<no-load-paging *ngIf="results.length > pageSize" [type]="type"
|
<errorMessages [status]="[status]" [type]="type" tab_error_class=true></errorMessages>
|
||||||
(pageChange)="updatePage($event)"
|
<no-load-paging *ngIf="results.length > pageSize" [type]="type"
|
||||||
[page]="page" [pageSize]="pageSize"
|
(pageChange)="updatePage($event)"
|
||||||
[totalResults]="results.length">
|
[page]="page" [pageSize]="pageSize"
|
||||||
</no-load-paging>
|
[totalResults]="results.length">
|
||||||
<ul class="uk-list uk-list-divider uk-margin">
|
</no-load-paging>
|
||||||
<li *ngFor="let result of results.slice((page-1)*pageSize, page*pageSize)">
|
<ul class="uk-list uk-list-divider uk-margin">
|
||||||
<result-preview [modal]="modal" [properties]="properties" [hasLink]="false" [result]="getResultPreview(result)" [showOrcid]="false" [isCard]="false"></result-preview>
|
<li *ngFor="let result of results.slice((page-1)*pageSize, page*pageSize)">
|
||||||
</li>
|
<result-preview [modal]="modal" [properties]="properties" [hasLink]="false" [result]="getResultPreview(result)" [showOrcid]="false" [isCard]="false"></result-preview>
|
||||||
</ul>
|
</li>
|
||||||
<no-load-paging *ngIf="results.length > pageSize" [type]="type"
|
</ul>
|
||||||
(pageChange)="updatePage($event)"
|
<no-load-paging *ngIf="results.length > pageSize" [type]="type"
|
||||||
[page]="page" [pageSize]="pageSize"
|
(pageChange)="updatePage($event)"
|
||||||
[totalResults]="results.length">
|
[page]="page" [pageSize]="pageSize"
|
||||||
</no-load-paging>
|
[totalResults]="results.length">
|
||||||
|
</no-load-paging>
|
||||||
|
</div>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
export class DeletedByInferenceComponent {
|
export class DeletedByInferenceComponent {
|
||||||
|
@ -113,5 +116,6 @@ export class DeletedByInferenceComponent {
|
||||||
|
|
||||||
public updatePage($event) {
|
public updatePage($event) {
|
||||||
this.page = $event.value;
|
this.page = $event.value;
|
||||||
|
HelperFunctions.scrollToId("versions_container");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -424,8 +424,10 @@
|
||||||
|
|
||||||
<div *ngIf="!rightSidebarOffcanvasClicked" class="landing-right-sidebar-min-width uk-width-1-3 uk-width-1-4@l uk-padding-remove landing-background-grey-color uk-text-small uk-visible@m"
|
<div *ngIf="!rightSidebarOffcanvasClicked" class="landing-right-sidebar-min-width uk-width-1-3 uk-width-1-4@l uk-padding-remove landing-background-grey-color uk-text-small uk-visible@m"
|
||||||
[class.uk-animation-right]="viewAll">
|
[class.uk-animation-right]="viewAll">
|
||||||
<div class="uk-sticky uk-overflow-auto landing-sidebar-height" uk-sticky="bottom: true" [attr.offset]="offset">
|
<div class="uk-sticky landing-sidebar-height" uk-sticky="bottom: true" [attr.offset]="offset">
|
||||||
<ng-container *ngTemplateOutlet="right_column"></ng-container>
|
<div class="uk-overflow-auto uk-height-1-1">
|
||||||
|
<ng-container *ngTemplateOutlet="right_column"></ng-container>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -599,10 +599,12 @@ export class ResultLandingComponent {
|
||||||
|
|
||||||
public updateReferencesPage($event) {
|
public updateReferencesPage($event) {
|
||||||
this.referencesPage = $event.value;
|
this.referencesPage = $event.value;
|
||||||
|
this.scrollToTabTop('references');
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateBioentitiesPage($event) {
|
public updateBioentitiesPage($event) {
|
||||||
this.bioentitiesPage = $event.value;
|
this.bioentitiesPage = $event.value;
|
||||||
|
this.scrollToTabTop('bioentities');
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateRelatedPage($event) {
|
public updateRelatedPage($event) {
|
||||||
|
|
|
@ -12,17 +12,17 @@ import {properties} from "../../../../environments/environment";
|
||||||
selector: 'showAuthors',
|
selector: 'showAuthors',
|
||||||
template: `
|
template: `
|
||||||
<ng-template #author_template let-author="author" let-i="i">
|
<ng-template #author_template let-author="author" let-i="i">
|
||||||
<span *ngIf="(!author.orcid && !author.orcid_pending) || !testBrowser" style="margin-right: 5px;">
|
<span *ngIf="isSticky || (!author.orcid && !author.orcid_pending) || !testBrowser" style="margin-right: 5px;">
|
||||||
{{author.fullName + ";"}}
|
{{author.fullName + ";"}}
|
||||||
</span>
|
</span>
|
||||||
<a *ngIf="(author.orcid || author.orcid_pending) && testBrowser" class="uk-flex-inline uk-flex-middle uk-link-text">
|
<a *ngIf="!isSticky && (author.orcid || author.orcid_pending) && testBrowser" class="uk-flex-inline uk-flex-middle uk-link-text">
|
||||||
<img *ngIf="author.orcid" src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="orcid" loading="lazy" style="width:16px; height:16px; margin-right: 3px;">
|
<img *ngIf="author.orcid" src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="orcid" loading="lazy" style="width:16px; height:16px; margin-right: 3px;">
|
||||||
<img *ngIf="!author.orcid && author.orcid_pending" src="assets/common-assets/common/ORCIDiD_iconbw16x16.png" alt="orcid bw" loading="lazy" style="margin-right: 3px;">
|
<img *ngIf="!author.orcid && author.orcid_pending" src="assets/common-assets/common/ORCIDiD_iconbw16x16.png" alt="orcid bw" loading="lazy" style="margin-right: 3px;">
|
||||||
<span style="margin-right: 5px;">
|
<span style="margin-right: 5px;">
|
||||||
{{author.fullName + ";"}}
|
{{author.fullName + ";"}}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<div *ngIf="(author.orcid || author.orcid_pending) && testBrowser"
|
<div *ngIf="!isSticky && (author.orcid || author.orcid_pending) && testBrowser"
|
||||||
class="default-dropdown uk-margin-remove-top uk-dropdown orcid-dropdown"
|
class="default-dropdown uk-margin-remove-top uk-dropdown orcid-dropdown"
|
||||||
uk-dropdown="mode:click; offset: 4" style="min-width: 465px !important;">
|
uk-dropdown="mode:click; offset: 4" style="min-width: 465px !important;">
|
||||||
<div class="uk-padding-small">
|
<div class="uk-padding-small">
|
||||||
|
@ -99,6 +99,7 @@ import {properties} from "../../../../environments/environment";
|
||||||
|
|
||||||
export class ShowAuthorsComponent {
|
export class ShowAuthorsComponent {
|
||||||
@Input() authors: Author[];
|
@Input() authors: Author[];
|
||||||
|
@Input() isSticky: boolean = false;
|
||||||
@Input() authorsLimit: number = 7;
|
@Input() authorsLimit: number = 7;
|
||||||
@Input() showAll: boolean = true;
|
@Input() showAll: boolean = true;
|
||||||
@Input() modal: AlertModal;
|
@Input() modal: AlertModal;
|
||||||
|
|
Loading…
Reference in New Issue