This commit is contained in:
tiago.kayaya
2021-10-09 20:55:05 +01:00
parent b0c9c27890
commit aedf4afbaa
7 changed files with 30 additions and 40 deletions
@@ -64,7 +64,7 @@
<div>
<div class="file">
<!-- <canvas id="pdf_canvas"></canvas> -->
<div (click)="docIndex(i); viewDocument(msg.file)" class="file-details add-ellipsis cursor-pointer" *ngIf="msg.file">
<div (click)="docIndex(i); viewDocument(msg.file, file.title_link)" class="file-details add-ellipsis cursor-pointer" *ngIf="msg.file">
<span *ngIf="msg.file.type">
<fa-icon *ngIf="msg.file.type == 'application/pdf'" icon="file-pdf" class="pdf-icon"></fa-icon>
<fa-icon *ngIf="msg.file.type == 'application/word'" icon="file-word" class="word-icon"></fa-icon>
+5 -6
View File
@@ -282,16 +282,15 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
})
}
viewDocument(file:any){
viewDocument(file:any, url?:string){
console.log(file);
if(file.type == "file"){
let fullUrl = "https://www.tabularium.pt" + file.title_link;
this.fileService.viewDocumentByUrl(fullUrl);
if(file.type == "application/webtrix") {
this.openViewDocumentModal(file);
}
else{
//this.fileService.viewDocumentByUrl(file.title_link);
this.openViewDocumentModal(file);
let fullUrl = "https://www.tabularium.pt" + url;
this.fileService.viewDocumentByUrl(fullUrl);
}
}