This commit is contained in:
Ross
2021-09-09 13:17:10 +01:00
parent b440a05e87
commit 1ea977aab2
+12 -2
View File
@@ -3,7 +3,7 @@
{% block content %}
<div class="question-display-block">
Question <span class="question-number">1</span><br />
History: <span id="history"></span>
History: <span id="history"></span><br />
Images: <span id="series"></span>
<div id="single-dicom-viewer" class="dicom-viewer" data-images="" data-annotations=''>
</div>
@@ -85,7 +85,17 @@
$("#history").empty().append(data.title);
$("#series").empty();
data.image_titles.forEach((element, index) => {
$("#series").append(`<span>${index}: ${element}</span>`);
$("#series").append($(`<span>${index+1}: ${element}</span>`).click(() => {
let event = new CustomEvent('loadDicomViewerUrls', {
"detail": {
"images": data.images[index],
"annotations": data.annotations
}
});
window.dispatchEvent(event);
}));
})
// show some message according to the response.