.
This commit is contained in:
@@ -6,8 +6,8 @@
|
|||||||
{% for case in cases %}
|
{% for case in cases %}
|
||||||
<li data-question_pk={{case.pk}}>Case {{forloop.counter}}: {{case.title}}
|
<li data-question_pk={{case.pk}}>Case {{forloop.counter}}: {{case.title}}
|
||||||
|
|
||||||
<button class="show-case no-padding" data-title="{{case.title}}" data-target="https://viewer.penracourses.org.uk/viewer/dicomjson?url=https://www.penracourses.org.uk{% url 'atlas:case_dicom_json' case.pk %}">Show</button>
|
<button class="show-case no-padding" data-title="{{case.title}}" data-target="https://www.penracourses.org.uk/ohif/viewer/dicomjson?url=https://www.penracourses.org.uk{% url 'atlas:case_dicom_json' case.pk %}">Show</button>
|
||||||
<button class="open-case no-padding" data-title="{{case.title}}" data-target="https://viewer.penracourses.org.uk/viewer/dicomjson?url=https://www.penracourses.org.uk{% url 'atlas:case_dicom_json' case.pk %}">Open</button>
|
<button class="open-case no-padding" data-title="{{case.title}}" data-target="https://www.penracourses.org.uk/ohif/viewer/dicomjson?url=https://www.penracourses.org.uk{% url 'atlas:case_dicom_json' case.pk %}">Open</button>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@@ -30,16 +30,16 @@ var win2 = false;
|
|||||||
console.log('clicked', url)
|
console.log('clicked', url)
|
||||||
$('#case-title').text($(this).data('title'));
|
$('#case-title').text($(this).data('title'));
|
||||||
$('#viewer').attr('src', url)
|
$('#viewer').attr('src', url)
|
||||||
//if (win2 == false || win2.closed) {
|
|
||||||
// win2 = openSecondaryWindow(url);
|
|
||||||
// console.log('opened', win2)
|
|
||||||
//} else {
|
|
||||||
// win2.location.href = url
|
|
||||||
//}
|
|
||||||
});
|
});
|
||||||
$('.open-case').click(function() {
|
$('.open-case').click(function() {
|
||||||
var url = $(this).data('target');
|
var url = $(this).data('target');
|
||||||
|
if (win2 == false || win2.closed) {
|
||||||
win2 = openSecondaryWindow(url);
|
win2 = openSecondaryWindow(url);
|
||||||
|
console.log('opened', win2)
|
||||||
|
} else {
|
||||||
|
win2.location.href = url
|
||||||
|
}
|
||||||
|
//win2 = openSecondaryWindow(url);
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
function openSecondaryWindow(url) {
|
function openSecondaryWindow(url) {
|
||||||
|
|||||||
Reference in New Issue
Block a user