aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2015-05-13 17:15:31 +0000
committerzsloan2015-05-13 17:15:31 +0000
commit5479718ce714a22eb3dbf795656cc69e66a8baee (patch)
treede53f3eea92b503db8f323f8f66da450d6efd9df /wqflask
parent960b4237249f6b7b914404dc312d77ed37049fe3 (diff)
downloadgenenetwork2-5479718ce714a22eb3dbf795656cc69e66a8baee.tar.gz
Fixed sorting on the trait page so that x values always appear at the bottom
Diffstat (limited to 'wqflask')
-rwxr-xr-xwqflask/wqflask/templates/show_trait.html13
1 files changed, 11 insertions, 2 deletions
diff --git a/wqflask/wqflask/templates/show_trait.html b/wqflask/wqflask/templates/show_trait.html
index d6f22f41..c646bf9f 100755
--- a/wqflask/wqflask/templates/show_trait.html
+++ b/wqflask/wqflask/templates/show_trait.html
@@ -146,7 +146,7 @@
function getValue(x) {
if (x.indexOf('input') >= 0) {
if ($(x).val() == 'x') {
- return 0
+ return 'x'
}
else {
return parseFloat($(x).val());
@@ -164,7 +164,16 @@
jQuery.fn.dataTableExt.oSort['cust-txt-desc'] = function (a, b) {
var x = getValue(a);
var y = getValue(b);
- return ((x < y) ? 1 : ((x > y) ? -1 : 0));
+
+ if (x == 'x') {
+ return 1;
+ }
+ else if (y == 'x') {
+ return -1;
+ }
+ else {
+ return ((x < y) ? 1 : ((x > y) ? -1 : 0));
+ }
};
$(document).ready( function () {