From 37500c0c36fbbb2b4ab291cf164b5397776357a7 Mon Sep 17 00:00:00 2001 From: zsloan Date: Fri, 25 Sep 2020 14:52:40 -0500 Subject: Fixed issue where attribute columns' alignment was offset by 1 * wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js - attribute cells' alignment and column names were wrong because they were referring to an attribute offset by 1 in the attribute list - --- .../wqflask/static/new/javascript/initialize_show_trait_tables.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 53d5b3f7..71eae87f 100644 --- a/wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js +++ b/wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js @@ -147,8 +147,8 @@ var primary_table = $('#samples_primary').DataTable( { sorted_key_list = Object.keys(js_data.attributes).sort() for (i=0; i < sorted_key_list.length; i++) { - $('td', row).eq(attribute_start_pos + i).addClass("column_name-" + js_data.attributes[sorted_key_list[i]].name) - $('td', row).eq(attribute_start_pos + i).attr("style", "text-align: " + js_data.attributes[sorted_key_list[i]].alignment + "; padding-top: 2px; padding-bottom: 0px;") + $('td', row).eq(attribute_start_pos + i + 1).addClass("column_name-" + js_data.attributes[sorted_key_list[i]].name) + $('td', row).eq(attribute_start_pos + i + 1).attr("style", "text-align: " + js_data.attributes[sorted_key_list[i]].alignment + "; padding-top: 2px; padding-bottom: 0px;") } }, 'data': js_data['sample_lists'][0], @@ -205,8 +205,8 @@ if (js_data.sample_lists.length > 1){ sorted_key_list = Object.keys(js_data.attributes).sort() for (i=0; i < sorted_key_list.length; i++) { - $('td', row).eq(attribute_start_pos + i).addClass("column_name-" + js_data.attributes[sorted_key_list[i]].name) - $('td', row).eq(attribute_start_pos + i).attr("style", "text-align: " + js_data.attributes[sorted_key_list[i]].alignment + "; padding-top: 2px; padding-bottom: 0px;") + $('td', row).eq(attribute_start_pos + i + 1).addClass("column_name-" + js_data.attributes[sorted_key_list[i]].name) + $('td', row).eq(attribute_start_pos + i + 1).attr("style", "text-align: " + js_data.attributes[sorted_key_list[i]].alignment + "; padding-top: 2px; padding-bottom: 0px;") } }, 'data': js_data['sample_lists'][1], -- cgit v1.2.3