aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2021-06-01 21:21:13 +0000
committerzsloan2021-06-01 21:21:13 +0000
commitd7ceda6ba6af7a0c65247b31ecd740dcb3032a65 (patch)
tree9e7281ddb58be1ee064b90d88ddc657f290de3f3 /wqflask
parenta73e34707d88e849a6d62afc58fe4aa1d88c5dec (diff)
downloadgenenetwork2-d7ceda6ba6af7a0c65247b31ecd740dcb3032a65.tar.gz
Fixed issue that caused attribute alignments to be off by one position
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/show_trait/SampleList.py1
-rw-r--r--wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js6
2 files changed, 4 insertions, 3 deletions
diff --git a/wqflask/wqflask/show_trait/SampleList.py b/wqflask/wqflask/show_trait/SampleList.py
index 67768308..92cea550 100644
--- a/wqflask/wqflask/show_trait/SampleList.py
+++ b/wqflask/wqflask/show_trait/SampleList.py
@@ -145,6 +145,7 @@ class SampleList:
val_as_float = float(value)
except:
all_numbers = False
+ break
if all_numbers:
self.attributes[key].alignment = "right"
diff --git a/wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js b/wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js
index f9369fb9..6ca92fb6 100644
--- a/wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js
+++ b/wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js
@@ -150,8 +150,8 @@ var primary_table = $('#samples_primary').DataTable( {
}
for (i=0; i < attr_keys.length; i++) {
- $('td', row).eq(attribute_start_pos + i).addClass("column_name-" + js_data.attributes[attr_keys[i]].name)
- $('td', row).eq(attribute_start_pos + i).attr("style", "text-align: " + js_data.attributes[attr_keys[i]].alignment + "; padding-top: 2px; padding-bottom: 0px;")
+ $('td', row).eq(attribute_start_pos + i + 1).addClass("column_name-" + js_data.attributes[attr_keys[i]].name)
+ $('td', row).eq(attribute_start_pos + i + 1).attr("style", "text-align: " + js_data.attributes[attr_keys[i]].alignment + "; padding-top: 2px; padding-bottom: 0px;")
}
},
'data': js_data['sample_lists'][0],
@@ -225,4 +225,4 @@ if (js_data.sample_lists.length > 1){
} );
other_table.draw(); //ZS: This makes the table adjust its height properly on initial load
-} \ No newline at end of file
+}