Skip to content

Commit

Permalink
Merge pull request #97 from bernardo-campos/main
Browse files Browse the repository at this point in the history
fix: make setTimeoutInSeconds works
  • Loading branch information
freekmurze committed Aug 19, 2022
2 parents c115afd + 17499e4 commit 0f62927
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions resources/views/previewLinkPopup.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<div id="MailPreviewDriverBox" style="
position:absolute;
top:0;
top:10px;
right:10px;
z-index:99999;
background:#fff;
border:solid 1px #ccc;
Expand All @@ -15,9 +16,19 @@
<a style="text-decoration: underline" href="{{ $previewUrl }}&file_type=eml">Open mail in email client</a>
</li>
</ul>
<span onclick="closePopup()" id="close" style="
cursor: pointer;
font-size: smaller;
position: absolute;
top: 2px;
right: 6px;
font-family: monospace;">X</span>
</div>
<script type="text/javascript">
setTimeout(function () {
function closePopup() {
document.body.removeChild(document.getElementById('MailPreviewDriverBox'));
}, $timeoutInSeconds * 1000);
}
@if($timeoutInSeconds)
setTimeout(closePopup(), {{ $timeoutInSeconds }} * 1000);
@endif
</script>

0 comments on commit 0f62927

Please sign in to comment.