[Trunk | Library]: resultLanding.component: Load <citeThis> component, only if button to open modal is clicked (this will load javascript for cite this when needed) - improve performance.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58951 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
0c60a35955
commit
9338c43a23
|
@ -578,6 +578,6 @@
|
|||
</modal-alert>
|
||||
<modal-alert #citeModal [classTitle]="'landing-modal-header uk-padding-small'"
|
||||
[classBody]="'uk-padding-remove landing-modal'">
|
||||
<citeThis *ngIf="resultLandingInfo" [result]="resultLandingInfo" [id]="id" [type]="title.toLowerCase()"></citeThis>
|
||||
<citeThis *ngIf="resultLandingInfo && citeThisClicked" [result]="resultLandingInfo" [id]="id" [type]="title.toLowerCase()"></citeThis>
|
||||
</modal-alert>
|
||||
|
||||
|
|
|
@ -51,6 +51,8 @@ export class ResultLandingComponent {
|
|||
public thresholdDescription: number = 670;
|
||||
public showNumDescription: number = 670;
|
||||
|
||||
public citeThisClicked: boolean;
|
||||
|
||||
// Metrics tab variables
|
||||
public metricsClicked: boolean;
|
||||
public hasAltMetrics: boolean = false;
|
||||
|
@ -562,6 +564,7 @@ export class ResultLandingComponent {
|
|||
}
|
||||
|
||||
public openCiteModal() {
|
||||
this.citeThisClicked = true;
|
||||
this.citeModal.cancelButton = false;
|
||||
this.citeModal.okButton = false;
|
||||
this.citeModal.alertTitle = "Cite this " + this.getTypeName() + " to";
|
||||
|
|
Loading…
Reference in New Issue