From afa197ebd1bdd8c92aedc9c33a1cc653398c35bf Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 6 Jan 2025 13:13:03 -0600 Subject: Activate resumable UIs. --- uploader/templates/phenotypes/add-phenotypes-raw-files.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'uploader/templates') diff --git a/uploader/templates/phenotypes/add-phenotypes-raw-files.html b/uploader/templates/phenotypes/add-phenotypes-raw-files.html index 2264b59..568cf0b 100644 --- a/uploader/templates/phenotypes/add-phenotypes-raw-files.html +++ b/uploader/templates/phenotypes/add-phenotypes-raw-files.html @@ -628,12 +628,22 @@ return r; }; + resumables = [ + ["frm-add-phenotypes", "finput-phenotype-descriptions", "resumable-phenotype-descriptions", "tbl-preview-pheno-desc"], + ["frm-add-phenotypes", "finput-phenotype-data", "resumable-phenotype-data", "tbl-preview-pheno-data"], + ["frm-add-phenotypes", "finput-phenotype-se", "resumable-phenotype-se", "tbl-preview-pheno-se"], + ["frm-add-phenotypes", "finput-phenotype-n", "resumable-phenotype-n", "tbl-preview-pheno-n"], + ].map((row) => { + return makeResumableObject(row[0], row[1], row[2], row[3]); + }); + $("#frm-add-phenotypes input[type=submit]").on("click", (event) => { event.preventDefault(); // TODO: Check all the relevant files exist + // TODO: Verify that files are not duplicated // TODO: Check all fields // Start the uploads. - r.upload(); + resumables.forEach((r) => {r.upload();}); }); {%endblock%} -- cgit v1.2.3