aboutsummaryrefslogtreecommitdiff
path: root/wqflask/wqflask/templates
diff options
context:
space:
mode:
authorzsloan2021-05-10 17:29:39 +0000
committerzsloan2021-05-10 17:29:39 +0000
commitc821aab3ee7b0fe42af10c2e72b6a43f9ec6f528 (patch)
tree86517882087412066d50e53288d2e70850f0eac9 /wqflask/wqflask/templates
parent06c24f18f27daa4e32a3041878b24bea5cc30ddc (diff)
parent0dab1e85cb197ed37d93facef575f8ef934eca81 (diff)
downloadgenenetwork2-c821aab3ee7b0fe42af10c2e72b6a43f9ec6f528.tar.gz
Merge branch 'testing' of github.com:genenetwork/genenetwork2 into testing
Diffstat (limited to 'wqflask/wqflask/templates')
-rw-r--r--wqflask/wqflask/templates/gsearch_gene.html15
-rw-r--r--wqflask/wqflask/templates/gsearch_pheno.html15
2 files changed, 24 insertions, 6 deletions
diff --git a/wqflask/wqflask/templates/gsearch_gene.html b/wqflask/wqflask/templates/gsearch_gene.html
index 6fd0abe8..48953d98 100644
--- a/wqflask/wqflask/templates/gsearch_gene.html
+++ b/wqflask/wqflask/templates/gsearch_gene.html
@@ -55,7 +55,15 @@
<script language="javascript" type="text/javascript" src="/static/new/javascript/search_results.js"></script>
<script type='text/javascript'>
- var the_rows = {{ trait_list|safe }};
+ var getParams = function(url) {
+ let parser = document.createElement('a');
+ parser.href = url;
+ let params = parser.search.substring(1);
+ if(params.length > 0) {
+ return ('?'+params);
+ }
+ return params;
+ };
</script>
<script type="text/javascript" charset="utf-8">
@@ -142,7 +150,6 @@
$('td', row).eq(12).attr('data-export', $('td', row).eq(12).text());
$('td', row).eq(13).attr('data-export', $('td', row).eq(13).text());
},
- 'data': the_rows,
'columns': [
{
'data': null,
@@ -237,11 +244,13 @@
'order': [[1, "asc" ]],
'sDom': "pitirp",
'autoWidth': true,
- 'iDisplayLength': 500,
'deferRender': false,
'paging': true,
'orderClasses': true,
'processing': true,
+ 'iDisplayLength': 100,
+ 'bServerSide': true,
+ 'sAjaxSource': '/gsearch_table'+getParams(window.location.href),
'language': {
'loadingRecords': '&nbsp;',
'processing': 'Loading...'
diff --git a/wqflask/wqflask/templates/gsearch_pheno.html b/wqflask/wqflask/templates/gsearch_pheno.html
index 987b51a7..af9740ae 100644
--- a/wqflask/wqflask/templates/gsearch_pheno.html
+++ b/wqflask/wqflask/templates/gsearch_pheno.html
@@ -55,7 +55,15 @@
<script language="javascript" type="text/javascript" src="/static/new/javascript/search_results.js"></script>
<script type='text/javascript'>
- var the_rows = {{ trait_list|safe }};
+ var getParams = function(url) {
+ let parser = document.createElement('a');
+ parser.href = url;
+ let params = parser.search.substring(1);
+ if(params.length > 0) {
+ return ('?'+params);
+ }
+ return params;
+ };
</script>
<script type="text/javascript" charset="utf-8">
@@ -130,7 +138,6 @@
$('td', row).eq(9).attr('data-export', $('td', row).eq(9).text());
$('td', row).eq(10).attr('data-export', $('td', row).eq(10).text());
},
- 'data': the_rows,
'columns': [
{
'data': null,
@@ -241,10 +248,12 @@
'sDom': "pitirp",
'autoWidth': false,
'deferRender': false,
- 'iDisplayLength': 500,
'paging': true,
'orderClasses': true,
'processing': true,
+ 'iDisplayLength': 100,
+ 'bServerSide': true,
+ 'sAjaxSource': '/gsearch_table'+getParams(window.location.href),
'language': {
'loadingRecords': '&nbsp;',
'processing': 'Loading...'