summaryrefslogtreecommitdiffstats
path: root/templates/todolists
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-09-01 14:39:57 +0200
committerDan McGee <dan@archlinux.org>2010-09-01 14:39:57 +0200
commitd7854ed8f1af5b203efad976c04a43f80b336a2b (patch)
tree300d5c1be15792ff7fde6c2bb6b4d23f14d66b41 /templates/todolists
parentd57696c8013d78f017972ae72efeeb441c954cb2 (diff)
downloadarchweb-d7854ed8f1af5b203efad976c04a43f80b336a2b.tar.gz
archweb-d7854ed8f1af5b203efad976c04a43f80b336a2b.tar.xz
Make sort work on developer todo list status
Because it was a link, the sort didn't properly sort on the complete/incomplete status when viewing a todo list. Add a custom parser to fix it. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates/todolists')
-rw-r--r--templates/todolists/view.html14
1 files changed, 13 insertions, 1 deletions
diff --git a/templates/todolists/view.html b/templates/todolists/view.html
index b5f9a32..504c8cb 100644
--- a/templates/todolists/view.html
+++ b/templates/todolists/view.html
@@ -69,8 +69,20 @@
return false;
});
});
+$.tablesorter.addParser({
+ id: 'todostatus',
+ is: function(s) { return false; },
+ format: function(s) {
+ return s.match(/incomplete/) ? 1 : 0;
+ },
+ type: 'numeric'
+});
$(document).ready(function() {
- $(".results").tablesorter({widgets: ['zebra'], sortList: [[0,0], [1,0]]});
+ $(".results").tablesorter({
+ widgets: ['zebra'],
+ sortList: [[0,0], [1,0]],
+ headers: { 4: { sorter: 'todostatus' } }
+ });
});
</script>
{% endblock %}