Add Page selector for PDFs
This commit is contained in:
parent
ad311f82df
commit
d1cd6bd6a6
@ -88,7 +88,10 @@ export class PageService {
|
||||
page['parent_title']=item['parentTitle']['title'];
|
||||
page['parent_link']=item['parentTitle']['link'];
|
||||
|
||||
if (item['acf']['pdf']) { page['pdf']=item['acf']['pdf']; }
|
||||
if (item['acf']['pdf']) {
|
||||
page['pdf']=item['acf']['pdf'];
|
||||
if (item['acf']['pagina_del_pdf']) page['pdf']['url'] = page['pdf']['url']+"#page="+item['acf']['pagina_del_pdf'];
|
||||
}
|
||||
else { page['pdf']=null; }
|
||||
|
||||
/* chilsd */
|
||||
|
@ -22,6 +22,7 @@ export class PageItem {
|
||||
es:{ slug:string},
|
||||
eu:{ slug:string},
|
||||
},
|
||||
public pdf?:any,
|
||||
) {}
|
||||
|
||||
// public set (key,attr) {
|
||||
|
@ -41,7 +41,6 @@
|
||||
</section>
|
||||
<section class="section-publitas">
|
||||
<div class="row" *ngIf="page.pdf">
|
||||
|
||||
<div class="col-md-12">
|
||||
<!-- <div><h3>{{page.pdf.title}}</h3></div> -->
|
||||
<simple-pdf-viewer #pdfViewer [src]="page.pdf.url" [removePageBorders]="true" (onProgress)="onProgressPDF($event,page.pdf.filesize)"></simple-pdf-viewer>
|
||||
|
@ -90,7 +90,7 @@ export class PageComponent implements OnInit {
|
||||
.subscribe(data => {
|
||||
this.pages = data;
|
||||
this.pages.forEach( (p) => {
|
||||
this.pageService.currentPage = p;
|
||||
this.pageService.currentPage = p as PageItem;
|
||||
var safeUrl:SafeUrl;
|
||||
safeUrl = this.sanitizer.bypassSecurityTrustUrl('https://backend.industriapaisaia.eus/wp-content/uploads/2018/10/test.pdf');
|
||||
p['publitas_link_sanitize'] = safeUrl;
|
||||
|
Loading…
Reference in New Issue
Block a user