aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2022-09-08 19:52:50 +0000
committerzsloan2022-09-08 14:54:31 -0500
commit9bc71ba5fc999e0559d30b842c56a338f394533d (patch)
treec2e1708c0a57d88f2113ba425e78cfb6f5dc1951 /wqflask
parent80fba7544b4816c94b0675d7b3f9b8821bf224e3 (diff)
downloadgenenetwork2-9bc71ba5fc999e0559d30b842c56a338f394533d.tar.gz
Filter export by checked rows (when any rows are checked)
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/static/new/javascript/show_trait.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js
index 3a827f41..79e20639 100644
--- a/wqflask/wqflask/static/new/javascript/show_trait.js
+++ b/wqflask/wqflask/static/new/javascript/show_trait.js
@@ -1122,7 +1122,12 @@ getSampleTableData = function(tableName, attributesAsList) {
attributeNodes.push(tableApi.column(attrCol + _i).nodes().to$())
}
+ checkedRows = getCheckedRows(tableName)
+
for (_j = 0; _j < valNodes.length; _j++){
+ if (!checkedRows.includes(_j) && checkedRows.length > 0) {
+ continue
+ }
sampleVal = valNodes[_j].childNodes[0].value
sampleName = $.trim(nameNodes[_j].childNodes[0].textContent)
if (isNumber(sampleVal) && sampleVal !== "") {
@@ -1148,7 +1153,7 @@ getSampleTableData = function(tableName, attributesAsList) {
}
}
- row_dict = {
+ rowDict = {
name: sampleName,
value: sampleVal,
se: sampleVar,
@@ -1156,10 +1161,10 @@ getSampleTableData = function(tableName, attributesAsList) {
}
for (_k = 0; _k < attributeNodes.length; _k++){
- row_dict[attributesAsList[_k]] = attributeNodes[_k][_j].textContent;
+ rowDict[attributesAsList[_k]] = attributeNodes[_k][_j].textContent;
}
- samples.push(row_dict)
+ samples.push(rowDict)
}
}
}