aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/static/new/javascript/search_results.js8
-rw-r--r--wqflask/wqflask/templates/mapping_results.html6
2 files changed, 8 insertions, 6 deletions
diff --git a/wqflask/wqflask/static/new/javascript/search_results.js b/wqflask/wqflask/static/new/javascript/search_results.js
index b696dc4d..685d6291 100644
--- a/wqflask/wqflask/static/new/javascript/search_results.js
+++ b/wqflask/wqflask/static/new/javascript/search_results.js
@@ -259,14 +259,16 @@ $(function() {
let naturalAsc = $.fn.dataTableExt.oSort["natural-ci-asc"]
let naturalDesc = $.fn.dataTableExt.oSort["natural-ci-desc"]
+ let na_equivalent_vals = ["N/A", "--", ""]; //ZS: Since there are multiple values that should be treated the same as N/A
+
function sort_NAs(a, b, sort_function){
- if (a === "N/A" && b === "N/A") {
+ if ( na_equivalent_vals.includes(a) && na_equivalent_vals.includes(b)) {
return 0;
}
- if (a === "N/A"){
+ if (na_equivalent_vals.includes(a)){
return 1
}
- if (b === "N/A") {
+ if (na_equivalent_vals.includes(b)) {
return -1;
}
return sort_function(a, b)
diff --git a/wqflask/wqflask/templates/mapping_results.html b/wqflask/wqflask/templates/mapping_results.html
index 9c170494..4ea7fa07 100644
--- a/wqflask/wqflask/templates/mapping_results.html
+++ b/wqflask/wqflask/templates/mapping_results.html
@@ -402,9 +402,9 @@
{ "type": "natural" , "orderDataType": "dom-inner-text" },
{ "type": "natural" },
{ "type": "natural" },
- { "type": "natural" },
- { "type": "natural" },
- { "type": "natural" , "orderDataType": "dom-inner-text" },
+ { "type": "natural-minus-na" },
+ { "type": "natural-minus-na" },
+ { "type": "natural-minus-na" , "orderDataType": "dom-inner-text" },
{ "type": "natural" }
],
"columnDefs": [ {