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,10 +12,12 @@ 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: `
|
||||||
|
<div id="versions_container">
|
||||||
<errorMessages [status]="[status]" [type]="type" tab_error_class=true></errorMessages>
|
<errorMessages [status]="[status]" [type]="type" tab_error_class=true></errorMessages>
|
||||||
<no-load-paging *ngIf="results.length > pageSize" [type]="type"
|
<no-load-paging *ngIf="results.length > pageSize" [type]="type"
|
||||||
(pageChange)="updatePage($event)"
|
(pageChange)="updatePage($event)"
|
||||||
|
@ -32,6 +34,7 @@ import {properties} from "../../../../../environments/environment";
|
||||||
[page]="page" [pageSize]="pageSize"
|
[page]="page" [pageSize]="pageSize"
|
||||||
[totalResults]="results.length">
|
[totalResults]="results.length">
|
||||||
</no-load-paging>
|
</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,10 +12,12 @@ 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: `
|
||||||
|
<div id="versions_container">
|
||||||
<errorMessages [status]="[status]" [type]="type" tab_error_class=true></errorMessages>
|
<errorMessages [status]="[status]" [type]="type" tab_error_class=true></errorMessages>
|
||||||
<no-load-paging *ngIf="results.length > pageSize" [type]="type"
|
<no-load-paging *ngIf="results.length > pageSize" [type]="type"
|
||||||
(pageChange)="updatePage($event)"
|
(pageChange)="updatePage($event)"
|
||||||
|
@ -32,6 +34,7 @@ import {properties} from "../../../../../environments/environment";
|
||||||
[page]="page" [pageSize]="pageSize"
|
[page]="page" [pageSize]="pageSize"
|
||||||
[totalResults]="results.length">
|
[totalResults]="results.length">
|
||||||
</no-load-paging>
|
</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,10 +424,12 @@
|
||||||
|
|
||||||
<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">
|
||||||
|
<div class="uk-overflow-auto uk-height-1-1">
|
||||||
<ng-container *ngTemplateOutlet="right_column"></ng-container>
|
<ng-container *ngTemplateOutlet="right_column"></ng-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<ng-template #right_column>
|
<ng-template #right_column>
|
||||||
<div class="uk-margin-medium-top uk-list uk-list-large uk-padding uk-padding-remove-vertical" [class.uk-list-divider]="!viewAll">
|
<div class="uk-margin-medium-top uk-list uk-list-large uk-padding uk-padding-remove-vertical" [class.uk-list-divider]="!viewAll">
|
||||||
|
|
|
@ -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