diff options
Diffstat (limited to 'uploader/templates/phenotypes/view-dataset.html')
-rw-r--r-- | uploader/templates/phenotypes/view-dataset.html | 48 |
1 files changed, 27 insertions, 21 deletions
diff --git a/uploader/templates/phenotypes/view-dataset.html b/uploader/templates/phenotypes/view-dataset.html index 38a4d11..306dcce 100644 --- a/uploader/templates/phenotypes/view-dataset.html +++ b/uploader/templates/phenotypes/view-dataset.html @@ -65,11 +65,7 @@ <div class="row"> - <div style="padding-bottom: 0.5em;"> - <a href="#" class="btn btn-info" id="btn-phenotypes-list-select-all">select all</a> - <a href="#" class="btn btn-info" id="btn-phenotypes-list-deselect-all">deselect all</a> - <a href="#" class="btn btn-info" id="btn-phenotypes-list-edit">edit</a> - </div> + <table id="tbl-phenotypes-list" class="table compact stripe cell-border"> <thead> <tr> @@ -93,20 +89,16 @@ {%block javascript%} <script type="text/javascript"> $(function() { - dtAddCommonHandlers("#tbl-phenotypes-list"); - + var species_id = {{species.SpeciesId}}; + var population_id = {{population.Id}}; + var dataset_id = {{dataset.Id}}; + var dataset_name = "{{dataset.Name}}"; var data = {{phenotypes | tojson}}; - $("#tbl-phenotypes-list").DataTable({ - responsive: true, - lengthMenu: [10, 25, 50, 100, 1000, data.length], - language: { - processing: "Processing results… Please wait.", - loadingRecord: "Loading phenotypes — Please wait.", - info: "_START_ to _END_ of _TOTAL_ phenotypes", - lengthMenu: "Show _MENU_ phenotypes", - }, - data: data, - columns: [ + + var dtPhenotypesList = buildDataTable( + "#tbl-phenotypes-list", + data, + [ { data: function(pheno) { return `<input type="checkbox" name="selected-phenotypes" ` @@ -117,7 +109,7 @@ }, {data: "sequence_number"}, { - data: function(pheno) { + data: function(pheno, type, set, meta) { var spcs_id = {{species.SpeciesId}}; var pop_id = {{population.Id}}; var dtst_id = {{dataset.Id}}; @@ -137,8 +129,22 @@ pheno.Pre_publication_description); } } - ] - }); + ], + { + select: "multi+shift", + layout: { + top1Start: { + pageLength: { + text: "Show _MENU_ of _TOTAL_" + } + }, + topStart: "info", + top1End: null + }, + rowId: function(pheno) { + return `${pheno.InbredSetCode}_${pheno.xref_id}`; + } + }); }); </script> {%endblock%} |