Add some favicons and show feedback images

This commit is contained in:
Ross
2020-06-20 18:54:15 +01:00
parent 978458f17e
commit a3e34f2dac
8 changed files with 17 additions and 1 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

+16 -1
View File
@@ -425,6 +425,9 @@ function loadQuestion(n, section = 1, force_reload = false) {
$(".canvas-panel").remove(); $(".canvas-panel").remove();
} }
// Remove feedback images
$(".feedback-image").remove();
// Set up thumbnails // Set up thumbnails
const thumbnails = $(".thumbs"); const thumbnails = $(".thumbs");
// Why are we checking this? // Why are we checking this?
@@ -1290,7 +1293,7 @@ function loadLocalQuestionSet() {
function receivedText(e) { function receivedText(e) {
const lines = e.target.result; const lines = e.target.result;
let j = JSON.parse(lines); let j = JSON.parse(lines);
setUpPacket(j); setUpPacket(j, file.name);
$("#options-panel").hide(); $("#options-panel").hide();
} }
} }
@@ -1713,6 +1716,18 @@ function addFeedback(current_question) {
) )
); );
} }
if (
current_question.hasOwnProperty("feedback_image") &&
current_question.feedback_image.length > 0
) {
// TODO: finish (load in dicom viewer)
current_question.feedback_image.forEach((img) => {
$(".question").append(
$(`<img class="feedback-image" src="${img}" />`)
)
})
}
} }
function markCorrect(qid, user_answer) { function markCorrect(qid, user_answer) {
+1
View File
@@ -0,0 +1 @@
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}