about summary refs log tree commit diff
path: root/uploader
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-01-06 11:28:49 -0600
committerFrederick Muriuki Muriithi2025-01-06 11:28:49 -0600
commit8edc08f3283b490dba1a2eb25eb0397b49493cb2 (patch)
tree00ba32514cc68ff01cd5655fc2c97a6f6a343bf1 /uploader
parent24bd7464b02acb110e5543a1201016c875f9703f (diff)
downloadgn-uploader-8edc08f3283b490dba1a2eb25eb0397b49493cb2.tar.gz
Trigger preview when user drops file on the resumable element.
Diffstat (limited to 'uploader')
-rw-r--r--uploader/templates/phenotypes/add-phenotypes-raw-files.html7
1 files changed, 7 insertions, 0 deletions
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"),