aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2021-03-17 21:04:37 +0000
committerzsloan2021-03-17 21:04:37 +0000
commit025811e559a1e6b1f04cd45f4f69a53fa7bbb379 (patch)
tree255b9f30207b1602d19721caa9784b0189fbffa6 /wqflask
parentf9bb77224092c38b8a14c9bca1044dcb843bcbae (diff)
downloadgenenetwork2-025811e559a1e6b1f04cd45f4f69a53fa7bbb379.tar.gz
Added a check for if there's a second value for case attributes, for situations where a case attribute also has a link
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js4
1 files changed, 4 insertions, 0 deletions
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 06e33878..05e4d547 100644
--- a/wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js
+++ b/wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js
@@ -104,7 +104,11 @@ build_columns = function() {
attr_name = Object.keys(data.extra_attributes).sort()[meta.col - data.first_attr_col]
if (attr_name != null && attr_name != undefined){
+ if (Array.isArray(data.extra_attributes[attr_name])){
+ return '<a href="' + data.extra_attributes[attr_name][1] + '">' + data.extra_attributes[attr_name][0] + '</a>'
+ } else {
return data.extra_attributes[attr_name]
+ }
} else {
return ""
}