aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/runserver.py3
-rw-r--r--wqflask/wqflask/static/new/images/question_mark.jpgbin0 -> 47158 bytes
-rw-r--r--wqflask/wqflask/static/new/javascript/bar_chart.js11
-rw-r--r--wqflask/wqflask/templates/collections/list.html9
-rw-r--r--wqflask/wqflask/templates/collections/view.html8
-rw-r--r--wqflask/wqflask/templates/correlation_page.html2
-rw-r--r--wqflask/wqflask/templates/search_result_page.html39
7 files changed, 43 insertions, 29 deletions
diff --git a/wqflask/runserver.py b/wqflask/runserver.py
index a6ae28af..50805643 100644
--- a/wqflask/runserver.py
+++ b/wqflask/runserver.py
@@ -11,6 +11,9 @@ import logging
import utility.logger
logger = utility.logger.getLogger(__name__ )
+import signal
+signal.signal(signal.SIGPIPE, signal.SIG_DFL)
+
BLUE = '\033[94m'
GREEN = '\033[92m'
BOLD = '\033[1m'
diff --git a/wqflask/wqflask/static/new/images/question_mark.jpg b/wqflask/wqflask/static/new/images/question_mark.jpg
new file mode 100644
index 00000000..82df7e81
--- /dev/null
+++ b/wqflask/wqflask/static/new/images/question_mark.jpg
Binary files differ
diff --git a/wqflask/wqflask/static/new/javascript/bar_chart.js b/wqflask/wqflask/static/new/javascript/bar_chart.js
index 7ec35148..d8540580 100644
--- a/wqflask/wqflask/static/new/javascript/bar_chart.js
+++ b/wqflask/wqflask/static/new/javascript/bar_chart.js
@@ -253,6 +253,17 @@
})())
]);
console.log("values: ", values);
+
+ decimal_exists = "False";
+ for(i=0; i < values.length; i++){
+ if (values[i]['y'] % 1 != 0){
+ decimal_exists = "True";
+ break;
+ }
+ }
+ if (decimal_exists == "False"){
+ _this.chart.yAxis.tickFormat(d3.format('d'))
+ }
d3.select("#bar_chart_container svg").datum([
{
values: values
diff --git a/wqflask/wqflask/templates/collections/list.html b/wqflask/wqflask/templates/collections/list.html
index 5a30c98c..b1284895 100644
--- a/wqflask/wqflask/templates/collections/list.html
+++ b/wqflask/wqflask/templates/collections/list.html
@@ -51,7 +51,7 @@
<tbody>
{% for uc in collections %}
<tr class="collection_line">
- <td style="padding-right: 0px;"><INPUT TYPE="checkbox" NAME="collection" class="checkbox trait_checkbox" VALUE="{{ uc.id }}"></td>
+ <td style="padding-left: 8px; padding-right: 0px; padding-top: 4px; align: center;"><INPUT TYPE="checkbox" NAME="collection" class="checkbox trait_checkbox" VALUE="{{ uc.id }}"></td>
<td align="right">{{ loop.index }}
{% if g.user_session.user_ob %}
<td><a class="collection_name" href="{{ url_for('view_collection', uc_id=uc.id) }}">{{ uc.name }}</a></td>
@@ -89,6 +89,13 @@
{% endif %}
<script>
$('#trait_table').dataTable( {
+ "drawCallback": function( settings ) {
+ $('#trait_table tr').click(function(event) {
+ if (event.target.type !== 'checkbox') {
+ $(':checkbox', this).trigger('click');
+ }
+ });
+ },
"columns": [
{ "type": "natural", "width": "3%" },
{ "type": "natural", "width": "8%" },
diff --git a/wqflask/wqflask/templates/collections/view.html b/wqflask/wqflask/templates/collections/view.html
index 094bc273..cae03b4a 100644
--- a/wqflask/wqflask/templates/collections/view.html
+++ b/wqflask/wqflask/templates/collections/view.html
@@ -181,14 +181,6 @@
{
extend: 'columnsToggle',
columns: ':not(:first-child)',
- columnText: function ( dt, idx, title ) {
- console.log("TITLE:", title)
- if (title == "Additive Effect ?"){
- return "Additive Effect"
- } else {
- return title;
- }
- },
postfixButtons: [ 'colvisRestore' ]
}
],
diff --git a/wqflask/wqflask/templates/correlation_page.html b/wqflask/wqflask/templates/correlation_page.html
index 3bde7dc7..f5fe2120 100644
--- a/wqflask/wqflask/templates/correlation_page.html
+++ b/wqflask/wqflask/templates/correlation_page.html
@@ -104,7 +104,7 @@
<td>
<a href="{{ url_for('show_trait_page',
trait_id = trait.name,
- dataset = dataset.name
+ dataset = trait.dataset.name
)}}">
{{ trait.name }}
</a>
diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html
index d4ec18e3..93e24cc7 100644
--- a/wqflask/wqflask/templates/search_result_page.html
+++ b/wqflask/wqflask/templates/search_result_page.html
@@ -77,16 +77,16 @@
{% endif %}
-->
- <div id="table_container" style="width: {% if dataset.type == 'ProbeSet' %}1300{% elif dataset.type == 'Publish' %}1200{% elif dataset.type == 'Geno' %}500{% endif %}px;">
+ <div id="table_container" style="width: {% if dataset.type == 'ProbeSet' %}1300{% elif dataset.type == 'Publish' %}1300{% elif dataset.type == 'Geno' %}400{% endif %}px;">
<table class="display dataTable nowrap" id='trait_table' style="float: left;">
<thead>
<tr>
<th></th>
{% for header in header_fields %}
{% if header == 'Max LRS' %}
- <th data-export="Max LRS">Max LRS</th>
+ <th data-export="Max LRS">Max LRS <a href="http://genenetwork.org//glossary.html#LRS" target="_blank"><img style="width: 15px; height: 15px;" src="/static/new/images/question_mark.jpg"></a></th>
{% elif header == 'Additive Effect' %}
- <th data-export="Additive Effect">Additive <a href="http://genenetwork.org//glossary.html#A" target="_blank"><sup style="color:#f00"> ?</sup></a></th>
+ <th data-export="Additive Effect">Additive Effect <a href="http://genenetwork.org//glossary.html#A" target="_blank"><img style="width: 15px; height: 15px;" src="/static/new/images/question_mark.jpg"></a></th>
{% else %}
<th data-export="{{header}}">{{header}}</th>
{% endif %}
@@ -99,9 +99,9 @@
<th></th>
{% for header in header_fields %}
{% if header == 'Max LRS' %}
- <th data-export="Max LRS">Max LRS</th>
+ <th data-export="Max LRS">Max LRS <a href="http://genenetwork.org//glossary.html#LRS" target="_blank"><img style="width: 15px; height: 15px;" src="/static/new/images/question_mark.jpg"></a></th>
{% elif header == 'Additive Effect' %}
- <th data-export="Additive Effect">Additive Effect<a href="http://genenetwork.org//glossary.html#A" target="_blank"><sup style="color:#f00"> ?</sup></a></th>
+ <th data-export="Additive Effect">Additive Effect <a href="http://genenetwork.org//glossary.html#A" target="_blank"><img style="width: 15px; height: 15px;" src="/static/new/images/question_mark.jpg"></a></th>
{% else %}
<th data-export="{{header}}">{{header}}</th>
{% endif %}
@@ -252,6 +252,7 @@
$('.trait_checkbox:checkbox').on("change", change_buttons);
},
"createdRow": function ( row, data, index ) {
+ $('td', row).eq(0).attr('style', 'padding-left: 8px; padding-right: 0px; padding-top: 4px; align: center;');
$('td', row).eq(1).attr('align', 'right');
$('td', row).eq(1).attr('data-export', index+1);
$('td', row).eq(2).attr('data-export', $('td', row).eq(2).text());
@@ -281,12 +282,12 @@
{ "type": "natural", "width": "2%" },
{ "type": "natural", "width": "5%" },
{ "type": "natural", "width": "6%" },
+ { "type": "natural" },
{ "type": "natural", "width": "30%" },
- { "type": "natural", "width": "25%" },
{ "type": "natural", "width": "5%" },
{ "type": "natural", "width": "6%" },
{ "type": "natural", "width": "10%" },
- { "type": "natural", "width": "9%" }
+ { "type": "natural", "width": "8%" }
],
"columnDefs": [ {
"targets": 0,
@@ -295,8 +296,7 @@
"order": [[1, "asc" ]],
buttons: [
{
- extend: 'colvis',
- text: 'Show or Hide Columns',
+ extend: 'columnsToggle',
columns: ':not(:first-child)',
postfixButtons: [ 'colvisRestore' ]
}
@@ -306,10 +306,10 @@
"autoWidth": false,
"deferRender": true,
"bSortClasses": false,
- "scrollY": "600px",
- "scrollCollapse": true,
- "scroller": true,
- "paging": false
+ "scrollCollapse": false,
+ "scroller": false,
+ "paging": false,
+ "orderClasses": true
} );
{% elif dataset.type == 'Geno' %}
$('#trait_table').DataTable( {
@@ -322,6 +322,7 @@
$('.trait_checkbox:checkbox').on("change", change_buttons);
},
"createdRow": function ( row, data, index ) {
+ $('td', row).eq(0).attr('style', 'padding-left: 8px; padding-right: 0px; padding-top: 4px; align: center;');
$('td', row).eq(1).attr('align', 'right');
$('td', row).eq(1).attr('data-export', index+1);
$('td', row).eq(2).attr('data-export', $('td', row).eq(2).text());
@@ -329,10 +330,10 @@
},
"data": json_trait_list,
"columns": [
- { "type": "natural", "width": "8%" },
+ { "type": "natural", "width": "5%" },
{ "type": "natural", "width": "12%" },
- { "type": "natural", "width": "40%" },
- { "type": "natural", "width": "40%"}
+ { "type": "natural" },
+ { "type": "natural", "width": "30%"}
],
"columnDefs": [ {
"targets": 0,
@@ -341,8 +342,7 @@
"order": [[1, "asc" ]],
buttons: [
{
- extend: 'colvis',
- text: 'Show or Hide Columns',
+ extend: 'columnsToggle',
columns: ':not(:first-child)',
postfixButtons: [ 'colvisRestore' ]
}
@@ -355,7 +355,8 @@
"scrollY": "600px",
"scrollCollapse": true,
"scroller": true,
- "paging": false
+ "paging": false,
+ "orderClasses": true
} );
{% endif %}