Refinamentos 1

This commit is contained in:
Paulo Pinto
2020-08-28 12:43:19 +01:00
parent 4c7dc5003e
commit e30e38f253
16 changed files with 16 additions and 152 deletions
@@ -3,8 +3,6 @@ import { AttachmentsService } from 'src/app/services/attachments.service';
import { Attachment } from 'src/app/models/attachment.model';
import { ActivatedRoute, Router } from '@angular/router';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { AlertController, ModalController } from '@ionic/angular';
import { ViewerPage } from 'src/app/pages/events/attachments/viewer/viewer.page'
@Component({
selector: 'app-attachments',
@@ -16,7 +14,7 @@ export class AttachmentsPage implements OnInit {
loadedEventAttachments: Attachment[];
pageId: string;
constructor(private attachamentsService: AttachmentsService, private activatedRoute: ActivatedRoute, private iab: InAppBrowser, private route: Router, private modalCtrl: ModalController) { }
constructor(private attachamentsService: AttachmentsService, private activatedRoute: ActivatedRoute, private iab: InAppBrowser, private route: Router) { }
ngOnInit() {
/* Emit new data when something changes */
@@ -39,23 +37,9 @@ export class AttachmentsPage implements OnInit {
async viewDocument(documenturl:string)
{
//var ref = cordova.InAppBrowser.open(documenturl, '_blank', 'location=yes');
const browser = this.iab.create(documenturl, "_self")
const url: string = documenturl.replace("webTRIX.Viewer","webTRIX.Viewer/branch1");
const browser = this.iab.create(url,"_blank");
browser.show();
// const modal = await this.modalCtrl.create({
// component: ViewerPage,
// componentProps: {
// externalLink: documenturl
// },
// cssClass: 'viewer',
// backdropDismiss: false
// });
// await modal.present();
// modal.onDidDismiss();
}
navigateBack(){