fix: JS error on dublicate embedded resource in same page

pull/954/head
Raphaël Vinot 2024-10-09 22:46:16 +02:00
parent 43b23c23ac
commit 774a99deb1
2 changed files with 3 additions and 3 deletions

View File

@ -317,7 +317,7 @@
{% endif %}
{% if 'other_captures' in details %}
{{ indexed_hash(details['other_captures'], hash) }}
{{ indexed_hash(details['other_captures'], url['url_object'].uuid + '_' + loop.index|string) }}
{% endif %}
<p><a href="{{ url_for('body_hash_details', body_hash=url['url_object'].body_hash, from_popup=True) }}">
Show more information about this embedded content.

View File

@ -230,7 +230,7 @@
{% macro other_captures_table(entries, max_entries, identifier) %}
<script type="text/javascript" nonce="{{ csp_nonce() }}">
document.addEventListener("DOMContentLoaded", () => {
new DataTable('#table_other_captures{{identifier}}', {
new DataTable('#table_other_captures_{{identifier}}', {
"order": [[ 1, "desc" ]],
"paging": false,
"info": false,
@ -251,7 +251,7 @@
</script>
<div>
<table id="table_other_captures{{identifier}}" class="table table-striped" style="width:100%">
<table id="table_other_captures_{{identifier}}" class="table table-striped" style="width:100%">
<thead>
<tr>
<th>Title</th>