Revision 60926
Added by Konstantinos Triantafyllou about 3 years ago
availableOn.component.ts | ||
---|---|---|
54 | 54 |
</span> |
55 | 55 |
</a> |
56 | 56 |
</div> |
57 |
<!-- <div *ngIf="showNum == threshold && availableOn && availableOn.length > 5">...</div>--> |
|
58 | 57 |
<div *ngIf="showNum == threshold && availableOn && availableOn.length > 5" class="uk-margin-bottom"> |
59 | 58 |
<a (click)="showNum = availableOn.length;" class="uk-flex uk-flex-middle uk-flex-center"> |
60 | 59 |
<span>View more</span> |
... | ... | |
70 | 69 |
|
71 | 70 |
export class AvailableOnComponent { |
72 | 71 |
@Input() availableOn: HostedByCollectedFrom[]; |
73 |
// { |
|
74 |
// "downloadName": string, "downloadUrl": string[], |
|
75 |
// "collectedName": string, "collectedId": string, |
|
76 |
// "accessMode": string[], "bestAccessMode": string, |
|
77 |
// "type": string, "year": string, icon: string |
|
78 |
// }[]; |
|
79 |
// public open = 'assets/common-assets/unlock.svg'; |
|
80 |
// public closed = 'assets/common-assets/lock.svg'; |
|
81 |
// public unknown = 'assets/common-assets/question.svg'; |
|
82 | 72 |
public threshold: number = 4; |
83 | 73 |
public showNum: number = 4; |
84 | 74 |
public dataProviderUrl = properties.searchLinkToDataProvider.split('?')[0]; |
... | ... | |
86 | 76 |
constructor() { |
87 | 77 |
} |
88 | 78 |
|
89 |
ngOnInit() { |
|
90 |
// this.availableOn.forEach(available => { |
|
91 |
// if (available.bestAccessMode) { |
|
92 |
// if (available.bestAccessMode.toLowerCase().indexOf('open') !== -1) { |
|
93 |
// available.icon = this.open; |
|
94 |
// } else if (available.bestAccessMode.toLowerCase().indexOf('not available') !== -1) { |
|
95 |
// available.icon = this.unknown; |
|
96 |
// } else { |
|
97 |
// available.icon = this.closed; |
|
98 |
// } |
|
99 |
// } else { |
|
100 |
// available.icon = this.unknown; |
|
101 |
// } |
|
102 |
// } |
|
103 |
// ); |
|
104 |
} |
|
79 |
ngOnInit() {} |
|
105 | 80 |
|
106 | 81 |
public removeUnknown(value: string): string { |
107 | 82 |
if (value.toLowerCase() === 'unknown') { |
... | ... | |
109 | 84 |
} |
110 | 85 |
return value; |
111 | 86 |
} |
112 |
|
|
113 |
public scroll() { |
|
114 |
HelperFunctions.scroll(); |
|
115 |
} |
|
116 | 87 |
} |
Also available in: Unified diff
[Library | Trunk]: Remove scroll to top from pages initiliazation