summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-09-03 03:07:09 +0200
committerDan McGee <dan@archlinux.org>2010-09-03 03:07:09 +0200
commit519460c7e248c6cafdb78a65c6f0221fd12ef886 (patch)
treec56addf1449535811a6093a4d95e5a7d5055f458 /templates
parent0141ae3b8bd2c976875edefa69c9c6fbda51d9e7 (diff)
downloadarchweb-519460c7e248c6cafdb78a65c6f0221fd12ef886.tar.gz
archweb-519460c7e248c6cafdb78a65c6f0221fd12ef886.tar.xz
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>
Diffstat (limited to 'templates')
-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 bb475b1..13840a8 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 %}