.
This commit is contained in:
@@ -66,11 +66,33 @@
|
|||||||
file = evt.target.files[0];
|
file = evt.target.files[0];
|
||||||
$(evt.target).removeClass("image-ident-warning");
|
$(evt.target).removeClass("image-ident-warning");
|
||||||
$(evt.target).removeClass("image-ident-ok");
|
$(evt.target).removeClass("image-ident-ok");
|
||||||
updateFileList();
|
//updateFileList();
|
||||||
|
|
||||||
|
|
||||||
console.log("input change1", evt);
|
console.log("input change1", evt);
|
||||||
console.log("input change", evt.target);
|
console.log("input change", evt.target);
|
||||||
ocr(evt.target);
|
ocr(evt.target);
|
||||||
|
|
||||||
|
el = evt.target;
|
||||||
|
|
||||||
|
console.log(el);
|
||||||
|
$(el).find(".temp-thumb").remove()
|
||||||
|
if (el.files.length > 0) {
|
||||||
|
extra_class = " image-ident-loading";
|
||||||
|
if ($(el).hasClass("image-ident-warning")) {
|
||||||
|
extra_class = " image-ident-warning"
|
||||||
|
} else if ($(el).hasClass("image-ident-ok")) {
|
||||||
|
extra_class = " image-ident-ok"
|
||||||
|
}
|
||||||
|
$(`#drop-filenames span[data-input-id='${el.id}']`).remove()
|
||||||
|
$("#drop-filenames").append(
|
||||||
|
`<span data-input-id='${el.id}'><span>${n}: ${el.files[0].name}</span><img class='uploading${extra_class}' data-input-id='${el.id}' src=${URL.createObjectURL(el.files[0])}></span>`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
loadDicomViewerAndFileImages();
|
||||||
|
|
||||||
// Check if we have selected a examination type
|
// Check if we have selected a examination type
|
||||||
if (!$("#id_examination_to option").length) {
|
if (!$("#id_examination_to option").length) {
|
||||||
|
|
||||||
@@ -92,23 +114,8 @@
|
|||||||
|
|
||||||
function updateFileList() {
|
function updateFileList() {
|
||||||
// Why do we update everything here?
|
// Why do we update everything here?
|
||||||
$("#drop-filenames").empty()
|
|
||||||
$("#image_form_set input[type=file]").each((n, el) => {
|
$("#image_form_set input[type=file]").each((n, el) => {
|
||||||
console.log(el);
|
|
||||||
$(el).find(".temp-thumb").remove()
|
|
||||||
if (el.files.length > 0) {
|
|
||||||
extra_class = " image-ident-loading";
|
|
||||||
if ($(el).hasClass("image-ident-warning")) {
|
|
||||||
extra_class = " image-ident-warning"
|
|
||||||
} else if ($(el).hasClass("image-ident-ok")) {
|
|
||||||
extra_class = " image-ident-ok"
|
|
||||||
}
|
|
||||||
$("#drop-filenames").append(
|
|
||||||
`<span>${n}: ${el.files[0].name}</span><img class='uploading${extra_class}' data-input-id='${el.id}' src=${URL.createObjectURL(el.files[0])}>`
|
|
||||||
)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
loadDicomViewerAndFileImages();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user