summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2015-05-27 16:40:49 +0200
committerLars-Dominik Braun <lars@6xq.net>2015-05-27 16:40:49 +0200
commitfd7e03c31d01b71b4e0647c50066ce304524aaad (patch)
tree6a94a45dc45a20755f93c99d7b290e269c35bc82
parentd9b2ed24a50c149bab7883b79b298e0276302f15 (diff)
downloadcomatose-fd7e03c31d01b71b4e0647c50066ce304524aaad.tar.gz
comatose-fd7e03c31d01b71b4e0647c50066ce304524aaad.tar.bz2
comatose-fd7e03c31d01b71b4e0647c50066ce304524aaad.zip
Fix sorting by year
-rw-r--r--data/script.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/data/script.js b/data/script.js
index f76a862..84cb562 100644
--- a/data/script.js
+++ b/data/script.js
@@ -15,7 +15,7 @@ $(document).ready (function () {
items.detach ().sort (function (nodeA, nodeB) {
var a = $(nodeA).data (by);
var b = $(nodeB).data (by);
- if (by == 'rank') {
+ if (by == 'rank' || by == 'year') {
a = parseFloat (a);
b = parseFloat (b);
return a > b ? 1 : (a < b ? -1 : 0);