diff options
author | Frederick Muriuki Muriithi | 2025-03-10 12:36:08 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2025-03-10 12:44:29 -0500 |
commit | 28c9447fb51fc764143b5add664e8f4b892a703d (patch) | |
tree | 9ccd74f92c5d416396221072048be3b41a91d8cc /uploader | |
parent | c6cf301278f1c1bc530d139d134e3c766aa10a3f (diff) | |
download | gn-uploader-28c9447fb51fc764143b5add664e8f4b892a703d.tar.gz |
Update how the DataTables handlers are set up.
Diffstat (limited to 'uploader')
-rw-r--r-- | uploader/static/js/populations.js | 4 | ||||
-rw-r--r-- | uploader/static/js/species.js | 3 | ||||
-rw-r--r-- | uploader/templates/phenotypes/view-dataset.html | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/uploader/static/js/populations.js b/uploader/static/js/populations.js index ded9b10..d4980db 100644 --- a/uploader/static/js/populations.js +++ b/uploader/static/js/populations.js @@ -18,7 +18,8 @@ var populationDataTable = (populationdata) => { data: (apopulation) => { return `<input type="radio" name="population_id"` + `id="rdo_population_id_${apopulation.InbredSetId}" ` - + `value="${apopulation.InbredSetId}">`; + + `value="${apopulation.InbredSetId}" ` + + `class="chk-row-select">`; } }, { @@ -35,6 +36,7 @@ var populationDataTable = (populationdata) => { $(() => { + dtAddCommonHandlers("#tbl-select-population"); populationDataTable(JSON.parse( $("#tbl-select-population").attr("data-populations-list"))); }); diff --git a/uploader/static/js/species.js b/uploader/static/js/species.js index b070725..0ab9c19 100644 --- a/uploader/static/js/species.js +++ b/uploader/static/js/species.js @@ -18,7 +18,7 @@ var speciesDataTable = (speciesdata) => { data: (aspecies) => { return `<input type="radio" name="species_id"` + `id="rdo_species_id_${aspecies.SpeciesId}" ` - + `value="${aspecies.SpeciesId}">`; + + `value="${aspecies.SpeciesId}" class="chk-row-select">`; } }, { @@ -34,6 +34,7 @@ var speciesDataTable = (speciesdata) => { }; $(() => { + dtAddCommonHandlers("#tbl-select-species"); speciesDataTable(JSON.parse( $("#tbl-select-species").attr("data-species-list"))); }); diff --git a/uploader/templates/phenotypes/view-dataset.html b/uploader/templates/phenotypes/view-dataset.html index 86c16f7..103ab02 100644 --- a/uploader/templates/phenotypes/view-dataset.html +++ b/uploader/templates/phenotypes/view-dataset.html @@ -85,6 +85,8 @@ {%block javascript%} <script type="text/javascript"> $(function() { + dtAddCommonHandlers("#tbl-phenotypes-list"); + var data = {{phenotypes | tojson}}; $("#tbl-phenotypes-list").DataTable({ responsive: true, |