[develop]: Fix showAuthors in modal.
This commit is contained in:
parent
c803674ceb
commit
3204ba18ff
|
@ -27,7 +27,7 @@ import {HelperFunctions} from "../../../utils/HelperFunctions.class";
|
|||
<ul class="uk-list uk-margin">
|
||||
<li *ngFor="let result of results.slice((page-1)*pageSize, page*pageSize)">
|
||||
<result-preview [modal]="modal" [properties]="properties" [hasLink]="false" [result]="getResultPreview(result)"
|
||||
[showOrcid]="false" [isCard]="false" [prevPath]="prevPath" [showInline]="true"
|
||||
[showOrcid]="false" [prevPath]="prevPath" [showInline]="true"
|
||||
[isDeletedByInferenceModal]="true"></result-preview>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -1,4 +1,13 @@
|
|||
import {Component, Inject, Input, PLATFORM_ID, ViewChild} from '@angular/core';
|
||||
import {
|
||||
AfterContentInit,
|
||||
AfterViewInit,
|
||||
ChangeDetectorRef,
|
||||
Component,
|
||||
Inject,
|
||||
Input,
|
||||
PLATFORM_ID,
|
||||
ViewChild
|
||||
} from '@angular/core';
|
||||
import {ActivatedRoute} from "@angular/router";
|
||||
import {RouterHelper} from "../routerHelper.class";
|
||||
import {EnvProperties} from '../properties/env-properties';
|
||||
|
@ -26,7 +35,8 @@ import {properties} from "../../../../environments/environment";
|
|||
{{author.fullName + ";"}}
|
||||
</span>
|
||||
</a>
|
||||
<div *ngIf="!isMobile" class="default-dropdown uk-margin-remove-top uk-dropdown orcid-dropdown" uk-dropdown="mode:click; offset: 4; container: true" style="min-width: 465px !important;">
|
||||
<div *ngIf="!isMobile" class="default-dropdown uk-margin-remove-top uk-dropdown orcid-dropdown"
|
||||
uk-dropdown="mode:click; offset: 4;" style="min-width: 465px !important;" [attr.container]="isModal?'#modal-container':true">
|
||||
<ng-container *ngTemplateOutlet="dropdown"></ng-container>
|
||||
</div>
|
||||
<mobile-dropdown *ngIf="isMobile" [toggle]="toggle">
|
||||
|
@ -93,7 +103,6 @@ import {properties} from "../../../../environments/environment";
|
|||
</div>
|
||||
</ng-template>
|
||||
</ng-container>
|
||||
|
||||
</ng-template>
|
||||
|
||||
<div *ngIf="authors"
|
||||
|
@ -144,6 +153,7 @@ export class ShowAuthorsComponent {
|
|||
@Input() authorsLimit: number = 7;
|
||||
@Input() showAll: boolean = true;
|
||||
@Input() modal: AlertModal;
|
||||
@Input() isModal: boolean
|
||||
@Input() viewAll: boolean = false;
|
||||
@Input() showInline: boolean = false; // do not open modal for "view more" when this is true
|
||||
public lessBtn: boolean = false;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, ElementRef, EventEmitter, Input, OnInit, Output} from "@angular/core";
|
||||
import {ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, OnInit, Output} from "@angular/core";
|
||||
import {NavigationStart, Router} from "@angular/router";
|
||||
|
||||
@Component({
|
||||
|
@ -21,7 +21,7 @@ export class MobileDropdownComponent implements OnInit{
|
|||
public opened: boolean = false;
|
||||
private static MOBILE_DROPDOWN_CONTAINER = 'mobile-dropdown-container';
|
||||
|
||||
constructor(private element: ElementRef, private router: Router) {
|
||||
constructor(private element: ElementRef, private router: Router, private cdr: ChangeDetectorRef) {
|
||||
this.router.events.subscribe(event => {
|
||||
if(event instanceof NavigationStart) {
|
||||
this.element.nativeElement.remove();
|
||||
|
@ -63,6 +63,7 @@ export class MobileDropdownComponent implements OnInit{
|
|||
close() {
|
||||
if(this.opened) {
|
||||
this.opened = false;
|
||||
this.cdr.detectChanges();
|
||||
this.onClose.emit();
|
||||
document.getElementsByTagName('body')[0].setAttribute('style', '');
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@
|
|||
</div>
|
||||
<!-- Authors -->
|
||||
<div *ngIf="result.authors" class="uk-margin-xsmall-bottom">
|
||||
<showAuthors [authors]="result.authors" [authorsLimit]=4 [modal]="modal" [isMobile]="isMobile"
|
||||
<showAuthors [authors]="result.authors" [authorsLimit]=4 [modal]="modal" [isMobile]="isMobile" [isModal]="isDeletedByInferenceModal"
|
||||
[showAll]=true [showInline]="showInline"></showAuthors>
|
||||
</div>
|
||||
<!-- Identifiers -->
|
||||
|
|
Loading…
Reference in New Issue