diff options
author | zsloan | 2022-06-13 20:57:13 +0000 |
---|---|---|
committer | zsloan | 2022-06-13 21:03:28 +0000 |
commit | 452fe67731d4e7935992eb84ac22af7e1f786678 (patch) | |
tree | 05ab4069477e12371d0f40b94103f9c9fa42c57e | |
parent | 710ac635482622021d46925a9c25207effa05386 (diff) | |
download | genenetwork2-452fe67731d4e7935992eb84ac22af7e1f786678.tar.gz |
Limit search result descriptions to 500 characters
-rw-r--r-- | wqflask/wqflask/templates/search_result_page.html | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html index b9859229..802e5362 100644 --- a/wqflask/wqflask/templates/search_result_page.html +++ b/wqflask/wqflask/templates/search_result_page.html @@ -425,6 +425,10 @@ } $('td', row).eq(4).attr('title', $('td', row).eq(4).text()); $('td', row).eq(4).attr('data-export', $('td', row).eq(4).text()); + if ($('td', row).eq(4).text().length > 500) { + $('td', row).eq(4).text($('td', row).eq(4).text().substring(0, 500)); + $('td', row).eq(4).text($('td', row).eq(4).text() + '...') + } $('td', row).slice(5,10).attr("align", "right"); $('td', row).eq(5).attr('data-export', $('td', row).eq(5).text()); $('td', row).eq(6).attr('data-export', $('td', row).eq(6).text()); @@ -434,6 +438,10 @@ {% elif dataset.type == 'Publish' %} $('td', row).eq(3).attr('title', $('td', row).eq(3).text()); $('td', row).eq(3).attr('data-export', $('td', row).eq(3).text()); + if ($('td', row).eq(3).text().length > 500) { + $('td', row).eq(3).text($('td', row).eq(3).text().substring(0, 500)); + $('td', row).eq(3).text($('td', row).eq(3).text() + '...') + } $('td', row).eq(4).attr('title', $('td', row).eq(4).text()); $('td', row).eq(4).attr('data-export', $('td', row).eq(4).text()); $('td', row).eq(4).attr('align', 'right'); |