summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-09-02 20:07:09 -0500
committerDan McGee <dan@archlinux.org>2010-09-02 20:07:09 -0500
commit519460c7e248c6cafdb78a65c6f0221fd12ef886 (patch)
treec56addf1449535811a6093a4d95e5a7d5055f458
parent0141ae3b8bd2c976875edefa69c9c6fbda51d9e7 (diff)
Add pkgcount sort helper to count column on groups page
Forgot it here when adding it to all of the tables on the devel dashboard. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--templates/packages/groups.html12
1 files changed, 11 insertions, 1 deletions
diff --git a/templates/packages/groups.html b/templates/packages/groups.html
index bb475b1e..13840a8b 100644
--- a/templates/packages/groups.html
+++ b/templates/packages/groups.html
@@ -30,8 +30,18 @@
{% load cdn %}{% jquery %}
<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
<script type="text/javascript">
+$.tablesorter.addParser({
+ id: 'pkgcount',
+ is: function(s) { return false; },
+ format: function(s) {
+ var m = s.match(/\d+/);
+ return m ? parseInt(m[0]) : 0;
+ },
+ type: 'numeric'
+});
+
$(document).ready(function() {
- $(".results").tablesorter({widgets: ['zebra'], sortList: [[1,0], [0,0]]});
+ $(".results").tablesorter({widgets: ['zebra'], sortList: [[1,0], [0,0]], headers: { 2: { sorter: 'pkgcount' } } });
});
</script>
{% endblock %}