start viva collections
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
{% extends 'atlas/exams.html' %}
|
||||
|
||||
{% block content %}
|
||||
<h3>Cases</h3>
|
||||
<ol id="full-question-list" class="sortable">
|
||||
{% for case in cases %}
|
||||
<li data-question_pk={{case.pk}}>Case {{forloop.counter}}: {{case.title}}
|
||||
|
||||
<button class="case-link" data-target="https://viewer.penracourses.org.uk/viewer/dicomjson?url=https://www.penracourses.org.uk{% url 'atlas:case_dicom_json' case.pk %}">Open</button>
|
||||
</li>
|
||||
|
||||
{% endfor %}
|
||||
</ol>
|
||||
|
||||
<iframe id="viewer" style="width: 100%; height: 500px; border: none"/>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block js %}
|
||||
<script type="text/javascript">
|
||||
var win2 = false;
|
||||
|
||||
$(document).ready(function() {
|
||||
console.log('ready')
|
||||
$('.case-link').click(function() {
|
||||
var url = $(this).data('target');
|
||||
console.log('clicked', url)
|
||||
$('#viewer').attr('src', url)
|
||||
//if (win2 == false || win2.closed) {
|
||||
// win2 = openSecondaryWindow(url);
|
||||
// console.log('opened', win2)
|
||||
//} else {
|
||||
// win2.location.href = url
|
||||
//}
|
||||
})
|
||||
});
|
||||
function openSecondaryWindow(url) {
|
||||
return win2 = window.open(url,'secondary','width=300,height=100');
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
{{ form.media }}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user