Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
wakaleo committed Jul 10, 2023
2 parents c73db1e + 5299f70 commit 8c2e5ff
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
@@ -1,4 +1,13 @@
<#macro reportData(reportData, number) >

<script>
function copyContent(id) {
console.log("copy content of " + id)
const content = document.getElementById(id).innerText
navigator.clipboard.writeText(content);
}
</script>

<#if reportData.contents?has_content>
<a name="${reportData.id}"></a>
<span>
Expand All @@ -13,9 +22,14 @@
<div class="card">
<h4 class="card-header" id="restModalLabel">
${reportData.title}
<a role="button" class="btn btn-xs copy-button" onclick="copyContent('reportDataContent-${number}')">
<i class="bi bi-clipboard"></i>&nbsp;Copy
</a>
</h4>
</div>
<div class="card-body"><pre>${(formatter.renderText(reportData.contents))!}</pre></div>
<div class="card-body">
<pre id="reportDataContent-${number}">${(formatter.renderText(reportData.contents))!}</pre>
</div>
</div>
</div>
<#else>
Expand Down
Expand Up @@ -2546,6 +2546,14 @@ div.scenario-text:empty {
background-color: rgba(238,0,0,0.3);
}

.copy-button {
float: right;
margin-top: 4px !important;
margin-bottom: 4px !important;
margin-right: 5px; !important;
font-size: 1em;
}

.missing-scenario-warning {
color:#ff1631
}
Expand Down

0 comments on commit 8c2e5ff

Please sign in to comment.