Skip to content

Commit

Permalink
OpenRefine added sandbox to iframe which breaks preview
Browse files Browse the repository at this point in the history
  • Loading branch information
stkenny committed Jul 26, 2024
1 parent a5febd4 commit 879d540
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
5 changes: 5 additions & 0 deletions src/main/resources/module/styles/flyout.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
padding:4px;
}

.rdf-flyout-content{
height: 90%;
width: 100%;
}

img.rdf-resource_preview_logo{
float:right;
width:30%;
Expand Down
20 changes: 4 additions & 16 deletions src/main/resources/templates/resource_preview_template.vt
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="/extension/rdf-extension/styles/flyout.css"></link>
<script type="text/javascript">
var request = new XMLHttpRequest()
request.open('GET', "$previewResourceUrl", true)
request.onload = function () {
document.getElementById("rdf-resource-preview-flyout-content").innerHTML = this.response;
}
// Send request
request.send()
</script>
</head>
<body>
<div><a href="$resourceUri">$resourceUri</a></div>
<div class="rdf-resource-preview-flyout-content" id="rdf-resource-preview-flyout-content">
<img src="/images/large-spinner.gif" />
<div>
Fetching information about $resourceUri
</div>
</div>
<div class="fbs-flyout-content" id="rdf-resource-preview-flyout-content">
<iframe class="rdf-flyout-content" src="$resourceUri"></iframe>
</div>
</body>
</html>
</html>

0 comments on commit 879d540

Please sign in to comment.