.
This commit is contained in:
+14
-3
@@ -244,7 +244,7 @@ async function loadExamList(data) {
|
|||||||
|
|
||||||
$(`li.cache-item[data-eid="${saved_exam.eid}"]`).addClass(
|
$(`li.cache-item[data-eid="${saved_exam.eid}"]`).addClass(
|
||||||
"cache-out-of-date"
|
"cache-out-of-date"
|
||||||
).append(`(latest: ${exam_timestamp}`);
|
).append(` [out of date (latest: ${exam_timestamp})]`);
|
||||||
} else {
|
} else {
|
||||||
$(`.packet-button[data-eid="${saved_exam.eid}"]`).addClass("cached");
|
$(`.packet-button[data-eid="${saved_exam.eid}"]`).addClass("cached");
|
||||||
}
|
}
|
||||||
@@ -956,8 +956,8 @@ async function loadQuestion(n, section = 1, force_reload = false) {
|
|||||||
|
|
||||||
$("#figure-" + id).append(img);
|
$("#figure-" + id).append(img);
|
||||||
|
|
||||||
// otherwise try to load it as a dicom
|
// otherwise try to load it as a dicom (if it starts with data)
|
||||||
} else {
|
} elif(based_img.startsWith("data:")) {
|
||||||
// convert the data url to a file
|
// convert the data url to a file
|
||||||
viewer
|
viewer
|
||||||
.urltoFile(based_img, "dicom", "application/dicom")
|
.urltoFile(based_img, "dicom", "application/dicom")
|
||||||
@@ -982,6 +982,17 @@ async function loadQuestion(n, section = 1, force_reload = false) {
|
|||||||
cornerstone.resize(element);
|
cornerstone.resize(element);
|
||||||
}); // .catch( function(error) {
|
}); // .catch( function(error) {
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
const img = $("<img />", {
|
||||||
|
src: based_img,
|
||||||
|
id: "thumb-" + id,
|
||||||
|
class: "thumbnail",
|
||||||
|
title: "Click on the thumbnail to view and manipulate the image.",
|
||||||
|
draggable: "false",
|
||||||
|
style: "height: 100px;",
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#figure-" + id).append(img);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user