add message incase document link is not a valida link

This commit is contained in:
Peter Maquiran
2024-02-23 12:22:56 +01:00
parent dab4c6c3c2
commit d5a98ea601
@@ -76,14 +76,17 @@ export class ViewerAttachmentPage implements OnInit {
// Optionally, you can add new content or recreate the iframe // Optionally, you can add new content or recreate the iframe
var newIframe = document.createElement('iframe'); var newIframe = document.createElement('iframe');
newIframe.src = linkRequest.value; if(linkRequest.value.includes("http")) {
newIframe.src = linkRequest.value;
newIframe.width = '100%' newIframe.width = '100%'
newIframe.height = '100%' newIframe.height = '100%'
this.iframeContainer.nativeElement.innerHTML = ""
this.iframeContainer.nativeElement.appendChild(newIframe)
this.iframeContainer.nativeElement.innerHTML = "" } else {
this.iframeContainer this.iframeContainer.nativeElement.innerHTML = "Sem documento"
this.iframeContainer.nativeElement.appendChild(newIframe) }
this.iframeContainer.nativeElement.style.display = 'flex' this.iframeContainer.nativeElement.style.display = 'flex'
} else { } else {