From 870ddf6075f38c1ce5e7bf8f90742f06fe7d4805 Mon Sep 17 00:00:00 2001
From: zsloan
Date: Wed, 16 Sep 2020 14:15:46 -0500
Subject: Changed references to se_exists to just get it as a property of
SampleList instead of calling the method
* wqflask/wqflask/show_trait/show_trait.py - see above
* wqflask/wqflask/templates/show_trait.html - see above + removed some
commented out code
---
wqflask/wqflask/show_trait/show_trait.py | 2 +-
wqflask/wqflask/templates/show_trait.html | 20 +++++---------------
2 files changed, 6 insertions(+), 16 deletions(-)
(limited to 'wqflask')
diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py
index f188fd9d..bc24098a 100644
--- a/wqflask/wqflask/show_trait/show_trait.py
+++ b/wqflask/wqflask/show_trait/show_trait.py
@@ -545,7 +545,7 @@ def get_table_widths(sample_groups, has_num_cases=False):
stats_table_width = 450
trait_table_width = 380
- if sample_groups[0].se_exists():
+ if sample_groups[0].se_exists:
trait_table_width += 80
if has_num_cases:
trait_table_width += 80
diff --git a/wqflask/wqflask/templates/show_trait.html b/wqflask/wqflask/templates/show_trait.html
index fc65c5b1..b7bffd79 100644
--- a/wqflask/wqflask/templates/show_trait.html
+++ b/wqflask/wqflask/templates/show_trait.html
@@ -211,7 +211,7 @@
//ZS: This variable is just created to get the column position of the first case attribute, since it's needed to set the row classes in createdRow for the DataTable
{% if sample_groups[0].attributes|length > 0 %}
- {% if sample_groups[0].se_exists() %}
+ {% if sample_groups[0].se_exists %}
{% if has_num_cases %}
attribute_start_pos = 6
{% else %}
@@ -246,7 +246,7 @@
$('td', row).eq(2).addClass("column_name-Sample")
$('td', row).eq(3).addClass("column_name-Value")
$('td', row).eq(3).attr("style", "text-align: right; padding-top: 2px; padding-bottom: 0px;");
- {% if sample_groups[0].se_exists() %}
+ {% if sample_groups[0].se_exists %}
$('td', row).eq(4).attr("align", "center");
$('td', row).eq(4).attr("style", "padding-left: 2px; padding-right: 2px;");
$('td', row).eq(5).addClass("column_name-SE")
@@ -301,7 +301,7 @@
return ''
}
}
- }{% if sample_groups[0].se_exists() %},
+ }{% if sample_groups[0].se_exists %},
{
'bSortable': false,
'type': "natural",
@@ -357,11 +357,6 @@
"scrollY": "50vh",
'scroller': true,
'scrollCollapse': true
- // 'processing': true,
- // 'language': {
- // 'loadingRecords': ' ',
- // 'processing': 'Loading...'
- // }
} );
primary_table.on( 'order.dt search.dt draw.dt', function () {
@@ -395,7 +390,7 @@
$('td', row).eq(2).addClass("column_name-Sample")
$('td', row).eq(3).addClass("column_name-Value")
$('td', row).eq(3).attr("style", "text-align: right; padding-top: 2px; padding-bottom: 0px;");
- {% if sample_groups[1].se_exists() %}
+ {% if sample_groups[1].se_exists %}
$('td', row).eq(4).attr("align", "center");
$('td', row).eq(4).attr("style", "padding-left: 2px; padding-right: 2px;");
$('td', row).eq(5).addClass("column_name-SE")
@@ -450,7 +445,7 @@
return ''
}
}
- }{% if sample_groups[1].se_exists() %},
+ }{% if sample_groups[1].se_exists %},
{
'bSortable': false,
'type': "natural",
@@ -506,11 +501,6 @@
"scrollY": "50vh",
'scroller': true,
'scrollCollapse': true
- // 'processing': true,
- // 'language': {
- // 'loadingRecords': ' ',
- // 'processing': 'Loading...'
- // }
} );
$('#other_searchbox').on( 'keyup', function () {
--
cgit v1.2.3