From 3c0715dc52dc583d8a84907a9ba41a799ed3068a Mon Sep 17 00:00:00 2001 From: zsloan Date: Tue, 12 Jan 2021 11:09:11 -0600 Subject: Added a line that redraws the DataTable, which fixes its initial scroll height --- wqflask/wqflask/templates/search_result_page.html | 37 ++++++----------------- 1 file changed, 9 insertions(+), 28 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html index 411a6628..5fe65c00 100644 --- a/wqflask/wqflask/templates/search_result_page.html +++ b/wqflask/wqflask/templates/search_result_page.html @@ -146,6 +146,7 @@ + @@ -383,36 +384,16 @@ }{% endif %} ], "order": [[1, "asc" ]], - {% if dataset.type != 'Geno' %} - buttons: [ - { - extend: 'columnsToggle', - columns: function( idx, data, node ) { - if (idx != 0) { - return true; - } else { - return false; - } - }, - postfixButtons: [ 'colvisRestore' ] - } - ], - 'sDom': "Bpitirp", - {% else %} - 'sDom': "pitirp", - {% endif %} - 'iDisplayLength': 500, - 'deferRender': true, - 'paging': true, - 'orderClasses': true, - 'processing': true, - 'bServerSide': true, - 'sAjaxSource': '/search_table'+getParams(window.location.href), - 'infoCallback': function(settings, start, end, max, total, pre) { - return "Showing " + start + " to " + (start + this.api().data().length - 1) + " of " + total + " entries"; - } + 'sDom': "itir", + "autoWidth": true, + "bSortClasses": false, + "scrollY": "100vh", + "scroller": true, + "scrollCollapse": true } ); + trait_table.draw(); //ZS: This makes the table adjust its height properly on initial load + $('.toggle-vis').on( 'click', function (e) { e.preventDefault(); -- cgit v1.2.3 From ac28594a4eba9c73b836170ef81beb93f40a11d6 Mon Sep 17 00:00:00 2001 From: zsloan Date: Wed, 13 Jan 2021 14:18:02 -0600 Subject: The Scroller CSS was removed because it forces all row text onto one line; Scroller still seems to function fine without it, which is a little strange --- wqflask/wqflask/templates/search_result_page.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html index 5fe65c00..b8f89121 100644 --- a/wqflask/wqflask/templates/search_result_page.html +++ b/wqflask/wqflask/templates/search_result_page.html @@ -3,7 +3,6 @@ {% block css %} - @@ -125,7 +124,7 @@ {% endif %} {% endif %} -
Loading... |
@@ -310,7 +309,6 @@
{
'title': "Description",
'type': "natural",
- 'width': "500px",
'data': null,
'render': function(data, type, row, meta) {
try {
--
cgit v1.2.3