about summary refs log tree commit diff
diff options
context:
space:
mode:
authorzsloan2016-04-12 17:26:08 +0000
committerzsloan2016-04-12 17:26:08 +0000
commit14dcf6db10a5e80d6d2cfa1c1102bef8c68887e6 (patch)
tree56a2a972b9ed8d87cbc31d557c4fc4f7e5bbe9f0
parenta49c7c9bc8929cfda8f2e854beba440d0d874a4e (diff)
downloadgenenetwork2-14dcf6db10a5e80d6d2cfa1c1102bef8c68887e6.tar.gz
Fixed order of columns in AJAX-loading global search and added trait link
Table width is now correct with Y scrolling
-rwxr-xr-xwqflask/wqflask/templates/gsearch_gene.html45
-rw-r--r--wqflask/wqflask/update_search_results.py2
2 files changed, 25 insertions, 22 deletions
diff --git a/wqflask/wqflask/templates/gsearch_gene.html b/wqflask/wqflask/templates/gsearch_gene.html
index 3f2888c2..7898435c 100755
--- a/wqflask/wqflask/templates/gsearch_gene.html
+++ b/wqflask/wqflask/templates/gsearch_gene.html
@@ -2,10 +2,6 @@
 {% block title %}Search Results{% endblock %}
 {% block css %}
     <link rel="stylesheet" type="text/css" href="/static/new/packages/DataTables/css/jquery.dataTables.css" />
-    <link rel="stylesheet" type="text/css" href="/static/packages/DT_bootstrap/DT_bootstrap.css" />
-    <link rel="stylesheet" type="text/css" href="/static/packages/TableTools/media/css/TableTools.css" />
-    <link rel="stylesheet" type="text/css" href="/static/new/packages/DataTables/extensions/dataTables.fixedHeader.css" >
-    <link rel="stylesheet" type="text/css" href="//cdn.datatables.net/fixedcolumns/3.0.4/css/dataTables.fixedColumns.css">
     <link rel="stylesheet" type="text/css" href="/static/new/packages/DataTables/extensions/buttons.bootstrap.css" />
 {% endblock %}
 {% block content %}
@@ -27,22 +23,28 @@
 
             <br />
             <br />
-            <table width="2000px" class="table table-hover table-striped" id="trait_table">
-              <thead>
-                <tr>
-                  <th></th>
-                  <th>Index</th>
-                  <th>Record</th> 
-                  <th>Symbol</th> 
-                  <th>Description</th> 
-                  <th>Location</th> 
-                  <th>Mean</th> 
-                  <th>Max LRS</th> 
-                  <th>Max LRS Location</th> 
-                  <th>Additive Effect</th>
-                </tr>
-              </thead> 
-            </table>
+            <div style="width: 2000px;">
+              <table width="2000px" id="trait_table" class="table table-hover table-striped" >
+                <thead>
+                  <tr>
+                    <th></th>
+                    <th>Index</th>
+                    <th>Species</th> 
+                    <th>Group</th> 
+                    <th>Tissue</th> 
+                    <th>Dataset</th> 
+                    <th>Record</th> 
+                    <th>Symbol</th> 
+                    <th>Description</th> 
+                    <th>Location</th>
+                    <th>Mean</th>
+                    <th>Max<br>LRS<a href="http://genenetwork.org/glossary.html#L" target="_blank"><sup style="color:#f00"> ?</sup></a></th>
+                    <th>Max LRS Location</th>
+                    <th>Additive<br>Effect<a href="http://genenetwork.org/glossary.html#A" target="_blank"><sup style="color:#f00"> ?</sup></a></th>
+                  </tr>
+                </thead> 
+              </table>
+            </div>
         </div>
     </div>
 
@@ -156,7 +158,8 @@
                     }
                 ],
                 "sDom": "Bfrti",
-                "scrollY": 800,
+                "autoWidth": false,
+                "scrollY": "800px",
                 "bDeferRender": true
             } );
 
diff --git a/wqflask/wqflask/update_search_results.py b/wqflask/wqflask/update_search_results.py
index 6faf0d4b..7de2d8c0 100644
--- a/wqflask/wqflask/update_search_results.py
+++ b/wqflask/wqflask/update_search_results.py
@@ -111,7 +111,7 @@ class GSearch(object):
                          trait.dataset.group.name, 
                          trait.dataset.tissue, 
                          trait.dataset.fullname, 
-                         trait.name, 
+                         "<a href=\"/show_trait?trait_id=" + trait.name + "&dataset=" + trait.dataset.name + "\">" + trait.name + "</a>", 
                          trait.symbol, 
                          trait.description_display, 
                          trait.location_repr,