From 66146f0adf91fc038dc324b585de3705f96201b3 Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 11 Nov 2021 22:09:19 +0000 Subject: [PATCH] . --- rapids/templates/rapids/rapid_form.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/rapids/templates/rapids/rapid_form.html b/rapids/templates/rapids/rapid_form.html index 39048138..a0e29142 100755 --- a/rapids/templates/rapids/rapid_form.html +++ b/rapids/templates/rapids/rapid_form.html @@ -151,7 +151,7 @@ //readFileAndProcess(); - readFileAndProcess2(); + readFileAndProcess2(el); // Check if we have selected a examination type if (!$("#id_examination_to option").length) { @@ -459,11 +459,12 @@ }); } - async function readFileAndProcess2(callback) { + async function readFileAndProcess2(el) { - file_set = $("#image_form_set input[type=file]"); + //file_set = $("#image_form_set input[type=file]"); + + //file_set.each(async (n, el) => { - file_set.each(async (n, el) => { if (el.files.length > 0) { filename = el.files[0].name; // Probably no need to await here anymore @@ -499,11 +500,11 @@ active_file_inputs.delete(el) console.log("active", active_file_inputs) // Only load once all queued files have been processed - } - }) if (active_file_inputs.size < 1) { loadViewer(); } + } + //}) } async function readFileAndProcess(callback) {