[Library | new-theme]: Fixes and updates for project and result landing pages redesign.
1. statisticsTab.component.ts: Added charts inside cards. 2. landing-header.component.ts: Updated margins according to mocks. 3. project.component.html: In #graph_and_feedback, updated offset attribute. | Updated wrapper class from "publication" to "project" | Removed "uk-margin-top" from labels section. 4. project.component.ts: a. Added field public graph_offset: number = 0; b. [Bug fix] Fix expressionchangedafterithasbeencheckederror - Updated when "offset" and "graph_offset" (calcGraphOffset()) is calculated. c. [Bug fix] Updated checks in hasMetrics(). d. [Bug fix] Updated title for organizationsModal to "Partners". 5. project.module.ts: Added in constructor iconsService.registerIcons([link, graph]). 6. projectService.module.ts: Removed IconsService - icons should be registred in project.module. 7. resultLanding.component.html: In #graph_and_feedback, updated offset attribute. 8. resultLanding.component.ts: Added field public graph_offset: number = 0; | [Bug fix] Fix expressionchangedafterithasbeencheckederror - Updated when "offset" and "graph_offset" (calcGraphOffset()) is calculated.
This commit is contained in:
parent
b1c9d3dc01
commit
d054922efa
|
@ -49,11 +49,13 @@ import {AlertModal} from "../../../utils/modal/alert";
|
|||
class="uk-text-primary">Under curation</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="uk-margin-medium-bottom">
|
||||
<showTitle [titleName]="title" classNames="uk-margin-remove-bottom"></showTitle>
|
||||
<div *ngIf="subTitle">
|
||||
<span class="uk-text-meta uk-text-small" [innerHTML]="subTitle"></span>
|
||||
</div>
|
||||
<div *ngIf="authors" class="uk-margin-top">
|
||||
</div>
|
||||
<div *ngIf="authors">
|
||||
<showAuthors [authorsLimit]="authorLimit" [modal]="modal" [showAll]="showAllAuthors" [authors]="authors"></showAuthors>
|
||||
</div>
|
||||
</div>`
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="projectInfo" class="publication">
|
||||
<div *ngIf="projectInfo" class="project">
|
||||
<div *ngIf="!showFeedback" class="uk-grid">
|
||||
|
||||
<!-- left box - actions -->
|
||||
|
@ -104,7 +104,8 @@
|
|||
</div>
|
||||
</ng-template>
|
||||
|
||||
<div #graph_and_feedback id="graph_and_feedback" class="uk-text-xsmall uk-visible@m" uk-sticky="bottom: true;" [attr.offset]="calcGraphOffset()">
|
||||
<div #graph_and_feedback id="graph_and_feedback" class="uk-text-xsmall uk-visible@m"
|
||||
uk-sticky="bottom: true;" [attr.offset]="graph_offset">
|
||||
<ng-container *ngTemplateOutlet="graph_and_feedback_template"></ng-container>
|
||||
</div>
|
||||
|
||||
|
@ -124,8 +125,7 @@
|
|||
[status]="projectInfo.status">
|
||||
</landing-header>
|
||||
<!-- Labels -->
|
||||
<div class="uk-margin-top uk-margin-bottom">
|
||||
|
||||
<div class="uk-margin-bottom">
|
||||
<ng-container *ngIf="projectInfo.openAccessMandatePublications != undefined && projectInfo.openAccessMandatePublications && projectInfo.openAccessMandateDatasets != undefined && projectInfo.openAccessMandateDatasets">
|
||||
<span class="uk-label uk-label-success uk-text-truncate"
|
||||
title="Open Access mandate for Publications and Research Data">Open Access mandate for Publications and Research Data
|
||||
|
@ -258,12 +258,6 @@
|
|||
<my-tab *ngIf="(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
|
||||
|| fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"
|
||||
[tabTitle]="'Statistics'" customClass="statistics" [tabId]="'statistics'" [active]="false"></my-tab>
|
||||
|
||||
<!-- <my-tab *ngIf="resultLandingInfo.references && resultLandingInfo.references.length > 0"-->
|
||||
<!-- [tabTitle]="'References'" [tabId]="'references'"-->
|
||||
<!-- [tabNumber]="resultLandingInfo.references.length">-->
|
||||
<!-- </my-tab>-->
|
||||
|
||||
</my-tabs>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -147,8 +147,9 @@ export class ProjectComponent {
|
|||
{label: OpenaireEntities.OTHER, value: "other", disabled: true}];
|
||||
|
||||
public offset: number;
|
||||
@ViewChild("graph_and_feedback") graph_and_feedback;
|
||||
public stickyHeader: boolean = false;
|
||||
public graph_offset: number = 0;
|
||||
@ViewChild("graph_and_feedback") graph_and_feedback;
|
||||
|
||||
subscriptions = [];
|
||||
properties: EnvProperties;
|
||||
|
@ -166,8 +167,7 @@ export class ProjectComponent {
|
|||
private _searchResearchResultsService: SearchResearchResultsService,
|
||||
private _reportsService: ReportsService,
|
||||
private htmlService: HtmlProjectReportService,
|
||||
private indexInfoService: IndexInfoService,
|
||||
private cdr: ChangeDetectorRef) {}
|
||||
private indexInfoService: IndexInfoService) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
|
@ -221,14 +221,21 @@ export class ProjectComponent {
|
|||
|
||||
this.createClipboard();
|
||||
}));
|
||||
this.offset = Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue('--navbar-height'));
|
||||
}
|
||||
|
||||
calcGraphOffset() {
|
||||
if(this.graph_and_feedback && window) {
|
||||
return window.innerHeight-this.graph_and_feedback.nativeElement.offsetHeight+"px";
|
||||
ngAfterViewInit() {
|
||||
if (typeof document !== 'undefined') {
|
||||
this.offset = Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue('--navbar-height'));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
ngAfterContentChecked() {
|
||||
if(this.graph_and_feedback && window) {
|
||||
this.graph_offset = this.calcGraphOffset();
|
||||
}
|
||||
}
|
||||
calcGraphOffset() {
|
||||
return window.innerHeight-this.graph_and_feedback.nativeElement.offsetHeight;
|
||||
}
|
||||
|
||||
public getFileNameType(type: string) {
|
||||
|
@ -515,7 +522,7 @@ export class ProjectComponent {
|
|||
}
|
||||
|
||||
public get hasMetrics(): boolean {
|
||||
return !(this.totalViews && this.totalDownloads && this.pageViews) || this.totalViews > 0 || this.totalDownloads > 0||this.pageViews > 0;
|
||||
return !(this.totalViews != null && this.totalDownloads != null && this.pageViews != null) || this.totalViews > 0 || this.totalDownloads > 0||this.pageViews > 0;
|
||||
}
|
||||
|
||||
public viewAllOrganizationsClick() {
|
||||
|
@ -530,7 +537,7 @@ export class ProjectComponent {
|
|||
public openOrganizationsModal() {
|
||||
this.organizationsModal.cancelButton = false;
|
||||
this.organizationsModal.okButton = false;
|
||||
this.organizationsModal.alertTitle = "Organizations";
|
||||
this.organizationsModal.alertTitle = "Partners";
|
||||
this.organizationsModal.open();
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,8 @@ import {SearchTabModule} from "../../utils/tabs/contents/search-tab.module";
|
|||
import {LoadingModule} from "../../utils/loading/loading.module";
|
||||
import {IconsModule} from "../../utils/icons/icons.module";
|
||||
import {InputModule} from "../../sharedComponents/input/input.module";
|
||||
import {IconsService} from "../../utils/icons/icons.service";
|
||||
import {graph, link} from "../../utils/icons/icons";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -51,4 +53,8 @@ import {InputModule} from "../../sharedComponents/input/input.module";
|
|||
ProjectComponent
|
||||
]
|
||||
})
|
||||
export class ProjectModule { }
|
||||
export class ProjectModule {
|
||||
constructor(private iconsService: IconsService) {
|
||||
this.iconsService.registerIcons([link, graph])
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,9 +3,6 @@ import {CommonModule} from '@angular/common';
|
|||
import {FormsModule} from '@angular/forms';
|
||||
|
||||
import {ProjectService} from './project.service';
|
||||
import {IconsService} from "../../utils/icons/icons.service";
|
||||
import {graph, link} from "../../utils/icons/icons";
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -17,8 +14,4 @@ import {graph, link} from "../../utils/icons/icons";
|
|||
],
|
||||
exports: []
|
||||
})
|
||||
export class ProjectServiceModule {
|
||||
constructor(private iconsService: IconsService) {
|
||||
this.iconsService.registerIcons([link, graph])
|
||||
}
|
||||
}
|
||||
export class ProjectServiceModule {}
|
||||
|
|
|
@ -110,7 +110,8 @@
|
|||
</div>
|
||||
</ng-template>
|
||||
|
||||
<div #graph_and_feedback id="graph_and_feedback" class="uk-text-xsmall uk-visible@m" uk-sticky="bottom: true;" [attr.offset]="calcGraphOffset()">
|
||||
<div #graph_and_feedback id="graph_and_feedback" class="uk-text-xsmall uk-visible@m"
|
||||
uk-sticky="bottom: true;" [attr.offset]="graph_offset">
|
||||
<ng-container *ngTemplateOutlet="graph_and_feedback_template"></ng-container>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -123,8 +123,9 @@ export class ResultLandingComponent {
|
|||
public filteredRelatedResults: RelationResult[];
|
||||
|
||||
public offset: number;
|
||||
@ViewChild("graph_and_feedback") graph_and_feedback;
|
||||
public stickyHeader: boolean = false;
|
||||
public graph_offset: number = 0;
|
||||
@ViewChild("graph_and_feedback") graph_and_feedback;
|
||||
|
||||
public viewAll: string = "";
|
||||
public noCommunities: boolean = false;
|
||||
|
@ -210,15 +211,21 @@ export class ResultLandingComponent {
|
|||
|
||||
this.scroll();
|
||||
}));
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
if (typeof document !== 'undefined') {
|
||||
this.offset = Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue('--navbar-height'));
|
||||
}
|
||||
|
||||
calcGraphOffset() {
|
||||
if(this.graph_and_feedback && window) {
|
||||
return window.innerHeight-this.graph_and_feedback.nativeElement.offsetHeight+"px";
|
||||
}
|
||||
return 0;
|
||||
|
||||
ngAfterContentChecked() {
|
||||
if(this.graph_and_feedback && window) {
|
||||
this.graph_offset = this.calcGraphOffset();
|
||||
}
|
||||
}
|
||||
calcGraphOffset() {
|
||||
return window.innerHeight-this.graph_and_feedback.nativeElement.offsetHeight;
|
||||
}
|
||||
|
||||
private initMetaAndLinks(type: string) {
|
||||
|
|
|
@ -91,8 +91,8 @@ export class ResultLandingService {
|
|||
res[1]['oaf:result']['country'] , // 10
|
||||
res[1]['oaf:result']['programmingLanguage'], // 11 - software
|
||||
//res[1]['oaf:result']['resulttype'],
|
||||
(res[1]['extraInfo'] !== undefined && res[1]['extraInfo']['citations'] !== undefined)
|
||||
? res[1]['extraInfo']['citations']['citation'] : null, // 12
|
||||
(res[1]['extraInfo'] !== undefined && res[1]['extraInfo']['references'] !== undefined)
|
||||
? res[1]['extraInfo']['references']['reference'] : null, // 12
|
||||
res[0], // 13
|
||||
res[2] // 14
|
||||
]))
|
||||
|
|
Loading…
Reference in New Issue