diff options
Diffstat (limited to 'wqflask/wqflask/templates/gsearch_pheno.html')
-rwxr-xr-x | wqflask/wqflask/templates/gsearch_pheno.html | 66 |
1 files changed, 38 insertions, 28 deletions
diff --git a/wqflask/wqflask/templates/gsearch_pheno.html b/wqflask/wqflask/templates/gsearch_pheno.html index f6b6efa3..e1dcf76f 100755 --- a/wqflask/wqflask/templates/gsearch_pheno.html +++ b/wqflask/wqflask/templates/gsearch_pheno.html @@ -19,37 +19,45 @@ <button class="btn btn-default" id="select_all"><span class="glyphicon glyphicon-ok"></span> Select All</button> <button class="btn btn-default" id="deselect_all"><span class="glyphicon glyphicon-remove"></span> Deselect All</button> <button class="btn btn-default" id="invert"><span class="glyphicon glyphicon-resize-vertical"></span> Invert</button> - <button class="btn btn-default" id="add"><span class="glyphicon glyphicon-plus-sign"></span> Add</button> + <button class="btn btn-default" id="add" disabled ><span class="glyphicon glyphicon-plus-sign"></span> Add</button> <button class="btn btn-primary pull-right"><span class="glyphicon glyphicon-download"></span> Download Table</button> + <input type="text" id="searchbox" class="form-control" style="width: 200px; display: inline;" placeholder="Search This Table For ..."> + <input type="text" id="select_top" class="form-control" style="width: 200px; display: inline;" placeholder="Select Top ..."> <br /> <br /> - <table class="table table-hover table-striped" id="trait_table"> + <table class="table table-hover table-striped" id='trait_table' style="float: left;"> <thead> <tr> - <th>Index</th> - <th>Species</th> - <th>Group</th> - <th>Record ID</th> - <th>Phenotype</th> - <th>Authors</th> - <th>Year</th> - <th>Max LRS</th> - <th>Locus</th> - <th>Additive</th> + <th style="width: 30px;"></th> + <th>Index</th> + <th>Species</th> + <th>Group</th> + <th>Record</th> + <th>Description</th> + <th>Authors</th> + <th>Year</th> + <th style="text-align: right;">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 style="text-align: right;">Additive<br>Effect<a href="http://genenetwork.org//glossary.html#A" target="_blank"><sup style="color:#f00"> ?</sup></a></th> </tr> </thead> - <tbody> - {% for this_trait in results %} - <TR> - <td><input type="checkbox">{{ loop.index }}</td> - {% for item in this_trait %} - <TD>{{ item }}</TD> - {% endfor %} + {% for this_trait in trait_list %} + <TR id="trait:{{ this_trait.name }}:{{ this_trait.dataset.name }}"> + <TD><INPUT TYPE="checkbox" NAME="searchResult" class="checkbox trait_checkbox" style="transform: scale(1.5);" VALUE="{{ data_hmac('{}:{}'.format(this_trait.name, this_trait.dataset.name)) }}"></TD> + <TD>{{ loop.index }}</TD> + <TD>{{ this_trait.dataset.group.species }}</TD> + <TD>{{ this_trait.dataset.group.name }}</TD> + <TD><a href="{{ url_for('show_trait_page', trait_id = this_trait.name, dataset = this_trait.dataset.name)}}">{{ this_trait.name }}</a></TD> + <TD>{{ this_trait.description_display }}</TD> + <TD>{{ this_trait.authors }}</TD> + <TD><a href="{{ this_trait.pubmed_link }}">{{ this_trait.pubmed_text }}</a></TD> + <TD>{{ this_trait.LRS_score_repr }}</TD> + <TD>{{ this_trait.LRS_location_repr }}</TD> + <TD>{{ '%0.3f' % this_trait.additive|float }}</TD> </TR> {% endfor %} </tbody> - </table> </div> </div> @@ -59,11 +67,11 @@ {% endblock %} {% block js %} - <script type="text/javascript" src="/static/new/javascript/search_results.js"></script> + <script language="javascript" type="text/javascript" src="/static/new/javascript/search_results.js"></script> <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/jquery.dataTables.min.js"></script> <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/dataTables.naturalSort.js"></script> - <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/extensions/dataTables.colResize.js"></script> + <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/extensions/dataTables.colResize2.js"></script> <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/extensions/dataTables.colReorder.js"></script> <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/extensions/dataTables.fixedHeader.js"></script> <script language="javascript" type="text/javascript" src="//cdn.datatables.net/fixedcolumns/3.0.4/js/dataTables.fixedColumns.min.js"></script> @@ -118,18 +126,20 @@ console.time("Creating table"); $('#trait_table').DataTable( { "columns": [ + { "bSortClasses": false }, + { "type": "natural" }, + { "type": "natural" }, + { "type": "natural" }, + { "type": "natural" }, { "type": "natural" }, { "type": "natural" }, { "type": "natural" }, { "type": "natural" }, { "type": "natural" }, - { "type": "natural" }, - { "type": "natural" }, - { "type": "natural" }, - { "type": "natural" }, - { "type": "natural" } + { "type": "natural" } ], - "sDom": "RJtir", + "order": [[ 1, "asc" ]], + "sDom": "RJtir", "iDisplayLength": -1, "autoWidth": true, "bLengthChange": true, |