diff options
author | zsloan | 2023-03-08 20:34:12 +0000 |
---|---|---|
committer | zsloan | 2023-03-08 20:35:00 +0000 |
commit | 22b917d4caf93d73d580163fcdbfb4662d1a61bc (patch) | |
tree | b968a1b6f145f5af7b93f3a83d9558196791812d | |
parent | ed1824fe735b200f3eb864c657f0b1f7cbe999a9 (diff) | |
download | genenetwork2-22b917d4caf93d73d580163fcdbfb4662d1a61bc.tar.gz |
Change the way table width is set for search results table
-rw-r--r-- | wqflask/wqflask/templates/search_result_page.html | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html index e013c7e6..9e8e269a 100644 --- a/wqflask/wqflask/templates/search_result_page.html +++ b/wqflask/wqflask/templates/search_result_page.html @@ -136,8 +136,8 @@ {% endif %} </div> {% endif %} - <div id="trait_table_container" style="{% if dataset.type == 'Geno' %}width: 450px;{% else %} min-width: 800px;{% endif %}"> - <table class="table-hover table-striped cell-border" id='trait_table' style="float: left;"> + <div id="trait_table_container" style="{% if dataset.type == 'Geno' %}width: 450px;{% else %}min-width: 1250px;{% endif %}"> + <table class="table-hover table-striped cell-border" id='trait_table' style="float: left; width: 100%;"> <tbody> <td colspan="100%" align="center"><br><b><font size="15">Loading...</font></b><br></td> </tbody> @@ -157,7 +157,6 @@ {% endblock %} {% block js %} - <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/md5.min.js') }}"></script> <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTables/js/jquery.dataTables.min.js') }}"></script> <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTablesExtensions/scroller/js/dataTables.scroller.min.js') }}"></script> <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='jszip/jszip.min.js') }}"></script> @@ -236,10 +235,14 @@ 'data': null, 'targets': 4, 'render': function(data) { + description = data.description + if (data.description.length > 200) { + description = data.description.slice(0, 200) + '...' + } try { - return decodeURIComponent(escape(data.description)) + return decodeURIComponent(escape(description)) } catch(err){ - return escape(data.description) + return escape(description) } } }, @@ -302,10 +305,14 @@ 'data': null, 'targets': 3, 'render': function(data) { + description = data.description + if (data.description.length > 200) { + description = data.description.slice(0, 200) + '...' + } try { - return decodeURIComponent(escape(data.description)) + return decodeURIComponent(escape(description)) } catch(err){ - return data.description + return escape(description) } } }, @@ -431,6 +438,7 @@ {% endif %} }, "order": [[1, "asc" ]], + "autoWidth": true, {% if traits_json|length > 10 %} "scrollY": "1000px", "scroller": true |