This commit is contained in:
Ross
2021-12-01 20:25:02 +00:00
parent 7c77efd3cf
commit 2a93691830
2 changed files with 16 additions and 25 deletions
+1 -1
View File
@@ -124,7 +124,7 @@ class SeriesForm(ModelForm):
widgets = {
"examination": autocomplete.ModelSelect2Multiple(
"examination": autocomplete.ModelSelect2(
url="generic:examination-autocomplete"
),
}
+15 -24
View File
@@ -6,24 +6,6 @@
<!--<script type="text/javascript" src="/admin/jsi18n/"></script>-->
<script type="text/javascript">
function showEditPopup(url) {
var win = window.open(url, "Edit",
'height=500,width=800,resizable=yes,scrollbars=yes');
return false;
}
function showAddPopup(triggeringLink) {
var name = triggeringLink.id.replace(/^add_/, '');
href = triggeringLink.href;
var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes');
win.focus();
return false;
}
function closePopup(win, newID, newRepr, id) {
console.log(id)
$(id + "_to").append('<option value=' + newID + ' title=' + newRepr + ' >' + newRepr + '</option>')
win.close();
}
document.addEventListener('drop', function (e) { e.preventDefault(); }, false);
function add_input_form() {
@@ -131,7 +113,7 @@
sortable('.sortable');
sortable('.sortable')[0].addEventListener('sortupdate', function(e) {
sortable('.sortable')[0].addEventListener('sortupdate', function (e) {
/*
This event is triggered when the user stops sorting and the DOM position has not yet changed.
@@ -143,10 +125,10 @@
e.detail.origin.elementIndex - {Integer} Index of the element in all elements in the Sortable Container
e.detail.origin.container - {HTMLElement} Sortable Container that element was moved out of (or copied from)
*/
//updateImagePositions();
//updateImagePositions();
$(".temp-thumb").remove()
loadDicomViewer();
loadDicomViewer();
});
});
@@ -228,10 +210,15 @@
image.title = file.name;
image.src = reader.result;
image.className = "temp-thumb";
console.log("read" ,el);
console.log("read", el);
$(el).parent().parent().prepend(image);
//images.push(reader.result);
loadViewer(images);
if (!$("#id_examination").find(":selected").length) {
var byteArray = new Uint8Array(reader.result);
extractDicomStudyDescription(byteArray);
}
});
}
@@ -347,7 +334,8 @@
{% endblock %}
{% block content %}
<h2>Add Series</h2>
This form will create a image set that can be associated with a atlas question. If the question has already been created it can be linked below.
This form will create a image set that can be associated with a atlas question. If the question has already been created
it can be linked below.
<form action="" method="post" enctype="multipart/form-data" id="atlas-form">
{% csrf_token %}
<a href="/generic/examination/create" id="add_examination" class="add-popup"
@@ -358,7 +346,10 @@ This form will create a image set that can be associated with a atlas question.
<h3>Images:</h3>
<input type="button" value="Add More Images" id="add_more_images">
<div id="drop-container" class="">Drop images here (or use the buttons below). Dropping images here will overwrite existing images in the series. When drag and dropping make sure to drag the first image or the order will not be maintained. Note: dicom images are often not exported in order (although their order can be automatically detected once uploaded)
<div id="drop-container" class="">Drop images here (or use the buttons below). Dropping images here will overwrite
existing images in the series. When drag and dropping make sure to drag the first image or the order will not be
maintained. Note: dicom images are often not exported in order (although their order can be automatically
detected once uploaded)
<div id="single-dicom-viewer" class="dicom-viewer" data-images="" data-annotations=''></div>
<div id="drop-filenames"></div>
</div>