diff options
author | Dan McGee <dan@archlinux.org> | 2012-07-25 07:45:36 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-07-25 07:45:36 +0200 |
commit | c1a6a87e23864ea044cb15f76b9dbb16734f08d8 (patch) | |
tree | a3f0a2ac4622ee4eab7009c93af8baa4d0d9cf0f /sitestatic | |
parent | 24b28a504cabcf077882aa95cfa0edbc6a8d4569 (diff) | |
download | archweb-c1a6a87e23864ea044cb15f76b9dbb16734f08d8.tar.gz archweb-c1a6a87e23864ea044cb15f76b9dbb16734f08d8.tar.xz |
Add arch and repo filter to todolist packages
This matches what we do on signoffs. Also beef up the styling a bit and
add the dynamically updated package count info.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'sitestatic')
-rw-r--r-- | sitestatic/archweb.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sitestatic/archweb.js b/sitestatic/archweb.js index e6d7341..6586d31 100644 --- a/sitestatic/archweb.js +++ b/sitestatic/archweb.js @@ -287,12 +287,21 @@ function filter_todolist() { if ($('#id_mine_only').is(':checked')) { rows = rows.filter('.mine'); } + /* apply arch and repo filters */ + $('#todolist_filter .arch_filter').add( + '#todolist_filter .repo_filter').each(function() { + if (!$(this).is(':checked')) { + rows = rows.not('.' + $(this).val()); + } + }); + /* more expensive filter because of 'has' call */ if ($('#id_incomplete').is(':checked')) { rows = rows.has('.incomplete'); } /* hide all rows, then show the set we care about */ all_rows.hide(); rows.show(); + $('#filter-count').text(rows.length); /* make sure we update the odd/even styling from sorting */ $('.results').trigger('applyWidgets'); } |