Compare commits

...

3 Commits

Author SHA1 Message Date
Siroco
d1cd6bd6a6 Add Page selector for PDFs 2018-12-06 15:32:24 +01:00
Siroco
ad311f82df Fix Mixed Content on Iterview template 2018-11-23 21:34:23 +01:00
Siroco
ea82b8f5a7 https on http://dedalo.anorgatarrak.eus - Fix Mix Content 2018-11-23 21:28:14 +01:00
6 changed files with 9 additions and 6 deletions

View File

@ -32,7 +32,7 @@
<div *ngFor="let video of entrevista.audiovisual; let i = index">
<div class="row" *ngIf="i==0">
<video controls style="width:auto;max-height:40vh; margin:auto;">
<source [src]="'http://dedalo.anorgatarrak.eus'+video.video" type="video/mp4">
<source [src]="'https://dedalo.anorgatarrak.eus'+video.video" type="video/mp4">
</video>
</div>
<div class="row" *ngIf="i==0">
@ -48,7 +48,7 @@
<section class="entrevista" *ngIf="entrevistas && !single">
<div class="row item-container-wrapper" *ngFor="let entrevista of entrevistas" [routerLink]="entrevista.id" style="">
<div class="col-md-3 offset-md-1">
<div *ngIf="entrevista.image" class="thumbnail-image" [ngStyle]="{backgroundImage:'url(http://dedalo.anorgatarrak.eus'+entrevista.image[0].src+')'}"></div>
<div *ngIf="entrevista.image" class="thumbnail-image" [ngStyle]="{backgroundImage:'url(https://dedalo.anorgatarrak.eus'+entrevista.image[0].src+')'}"></div>
</div>
<div class="col-md-7">
<div class="item-container" style="width:auto;">

View File

@ -65,7 +65,7 @@ export class InterviewComponent implements OnInit {
this.entrevistas = this.entrevistas.filter(entrevista => entrevista.id == this.entrevistaID)
if(this.entrevistas[0].title) { this.pages[0].title = this.entrevistas[0].title; }
if(this.entrevistas[0].abstract) { this.pages[0].excerpt = this.entrevistas[0].abstract; }
if(this.entrevistas[0].image) { this.pages[0].background_image = "http://dedalo.anorgatarrak.eus"+this.entrevistas[0].image[0].src; }
if(this.entrevistas[0].image) { this.pages[0].background_image = "https://dedalo.anorgatarrak.eus"+this.entrevistas[0].image[0].src; }
}
})
}

View File

@ -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 */

View File

@ -22,6 +22,7 @@ export class PageItem {
es:{ slug:string},
eu:{ slug:string},
},
public pdf?:any,
) {}
// public set (key,attr) {

View File

@ -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>

View File

@ -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;