diff options
| author | Frederick Muriuki Muriithi | 2026-01-23 14:17:17 -0600 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2026-01-23 14:17:17 -0600 |
| commit | 7718177c7d8d130d79f97fe8b5d963295391783d (patch) | |
| tree | 7bc452c3e71b154a490bd4d982e5d877c2b49c00 /uploader | |
| parent | af757dcbec07474f60e7d2983c2406c5fe02cda1 (diff) | |
| download | gn-uploader-7718177c7d8d130d79f97fe8b5d963295391783d.tar.gz | |
Collect all selected phenotype IDs for deletion.
Diffstat (limited to 'uploader')
| -rw-r--r-- | uploader/templates/phenotypes/view-dataset.html | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/uploader/templates/phenotypes/view-dataset.html b/uploader/templates/phenotypes/view-dataset.html index 293e524..f11377a 100644 --- a/uploader/templates/phenotypes/view-dataset.html +++ b/uploader/templates/phenotypes/view-dataset.html @@ -196,6 +196,34 @@ }); form.submit(); }); + + $("#btn-delete-phenotypes").on( + "click", + function(event) { + // Collect selected phenotypes for deletion, if any. + event.preventDefault(); + form = $("#frm-delete-phenotypes"); + form.find(".dynamically-added-element").remove(); + $("#tbl-phenotypes-list") + .DataTable() + .rows({selected: true}). + nodes().each(function(node, index) { + var parts = $(node) + .find(".chk-row-select") + .val() + .split("_"); + var xref_id = parts[parts.length - 1].trim(); + var chk = $('<input type="checkbox">'); + chk.attr("class", "dynamically-added-element"); + chk.attr("value", xref_id); + chk.attr("name", "xref_ids"); + chk.attr("style", "display: none"); + chk.prop("checked", true); + console.debug(chk); + form.append(chk); + }); + form.submit(); + }); }); </script> {%endblock%} |
