about summary refs log tree commit diff
path: root/wqflask/wqflask/templates/gsearch_pheno.html
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/wqflask/templates/gsearch_pheno.html')
-rw-r--r--wqflask/wqflask/templates/gsearch_pheno.html15
1 files changed, 12 insertions, 3 deletions
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...'