This commit is contained in:
Ross
2024-02-13 22:42:36 +00:00
parent 862755179a
commit bf09390160
4 changed files with 49 additions and 0 deletions
@@ -7,6 +7,7 @@
<p>Click on the 'Show' button to view the case in the viewer. Click on the 'Open' button to open the case in a new window.</p>
<p>Opening a second case will replace the first case in the viewer or window.</p>
</details>
<button class="show-collection no-padding" data-title="{{case.title}}" data-target="/ohif/viewer/dicomjson?url=https://www.penracourses.org.uk{% url 'atlas:collection_dicom_json' collection.pk %}">Show Collection</button>
<ol id="" class="sortable">
{% for case in cases %}
@@ -55,6 +56,12 @@
$(document).ready(function() {
const bc = new BroadcastChannel("test_channel");
console.log('ready')
$('.show-collection').click(function() {
var url = $(this).data('target');
console.log('clicked', url)
$('#case-title').text($(this).data('title'));
$('#viewer').attr('src', url)
});
$('.show-case').click(function() {
var url = $(this).data('target');
console.log('clicked', url)