From 22b917d4caf93d73d580163fcdbfb4662d1a61bc Mon Sep 17 00:00:00 2001 From: zsloan Date: Wed, 8 Mar 2023 20:34:12 +0000 Subject: Change the way table width is set for search results table --- wqflask/wqflask/templates/search_result_page.html | 22 +++++++++++++++------- 1 file 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 %} {% endif %} -
- +
+
@@ -157,7 +157,6 @@ {% endblock %} {% block js %} - @@ -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 -- cgit v1.2.3

Loading...