From c73f55287b986844d4c894e80a3cb76c1f05d8f8 Mon Sep 17 00:00:00 2001 From: zsloan Date: Wed, 24 Mar 2021 22:12:57 +0000 Subject: Added some default widths for situations where some wide columns exist and autoWidth can't be used on initial load + changed the logic for how to recalculate table width when a column is manually resized --- wqflask/wqflask/templates/search_result_page.html | 55 +++++++++++++++++------ 1 file changed, 42 insertions(+), 13 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html index 601fd63a..1826c694 100644 --- a/wqflask/wqflask/templates/search_result_page.html +++ b/wqflask/wqflask/templates/search_result_page.html @@ -125,7 +125,7 @@ {% endif %} {% endif %} -
Loading... |
@@ -190,23 +190,29 @@
{
'title': "Index",
'type': "natural",
- 'width': "30px",
+ 'width': "35px",
'targets': 1,
'data': "index"
- },
+ }
+ {% if dataset.type == 'ProbeSet' %},
{
'title': "Record",
'type': "natural-minus-na",
'data': null,
+ {% if wide_columns_exist == true %}
+ 'width': "{{ max_widths.display_name * 5 }}px",
+ {% endif %}
'targets': 2,
'render': function(data, type, row, meta) {
return '' + data.display_name + ''
}
- }{% if dataset.type == 'ProbeSet' %},
+ },
{
'title': "Symbol",
'type': "natural",
- 'width': "120px",
+ {% if wide_columns_exist == true %}
+ 'width': "200px",
+ {% endif %}
'targets': 3,
'data': "symbol"
},
@@ -214,6 +220,9 @@
'title': "Description",
'type': "natural",
'data': null,
+ {% if wide_columns_exist == true %}
+ 'width': "600px",
+ {% endif %}
'targets': 4,
'render': function(data, type, row, meta) {
try {
@@ -261,10 +270,21 @@
'targets': 9,
'orderSequence': [ "desc", "asc"]
}{% elif dataset.type == 'Publish' %},
+ {
+ 'title': "Record",
+ 'type': "natural-minus-na",
+ 'data': null,
+ {% if wide_columns_exist == true %}
+ 'width': "100px",
+ {% endif %}
+ 'targets': 2,
+ 'render': function(data, type, row, meta) {
+ return '' + data.display_name + ''
+ }
+ },
{
'title': "Description",
'type': "natural",
- 'width': "500px",
'data': null,
'render': function(data, type, row, meta) {
try {
@@ -277,14 +297,16 @@
{
'title': "