From 8edc08f3283b490dba1a2eb25eb0397b49493cb2 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 6 Jan 2025 11:28:49 -0600 Subject: Trigger preview when user drops file on the resumable element. --- uploader/templates/phenotypes/add-phenotypes-raw-files.html | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'uploader/templates/phenotypes/add-phenotypes-raw-files.html') diff --git a/uploader/templates/phenotypes/add-phenotypes-raw-files.html b/uploader/templates/phenotypes/add-phenotypes-raw-files.html index 3242549..0b0afcb 100644 --- a/uploader/templates/phenotypes/add-phenotypes-raw-files.html +++ b/uploader/templates/phenotypes/add-phenotypes-raw-files.html @@ -566,6 +566,13 @@ // TODO: Also trigger preview! resumableDisplayFiles( $("#resumable-phenotype-descriptions-selected-files"), files); + files.forEach((file) => { + readFirstNLines( + file.file, + 10, + [makePreviewUpdater( + $("#tbl-preview-pheno-desc"))]) + }); }), startUpload($("#resumable-phenotype-descriptions-browse-button"), $("#resumable-phenotype-descriptions-retry-button"), -- cgit v1.2.3