summaryrefslogtreecommitdiff
path: root/media/archweb.js
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-11-04 10:59:45 -0500
committerDan McGee <dan@archlinux.org>2011-11-04 10:59:45 -0500
commit8ba68aed370c2369bebaaca4d4158b6c40223c0f (patch)
tree1bcbc4a7caa9e8694424ef09b057b3896dc34c13 /media/archweb.js
parent20ebe658921c2ce78bf9a05116de045ee38f0820 (diff)
Add filter by target repo on signoffs page
And add a count of displayed rows below the filter options. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'media/archweb.js')
-rw-r--r--media/archweb.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/media/archweb.js b/media/archweb.js
index a9f4e0c9..2b8e5d6d 100644
--- a/media/archweb.js
+++ b/media/archweb.js
@@ -267,22 +267,27 @@ function filter_signoffs() {
/* start with all rows, and then remove ones we shouldn't show */
var rows = $('#tbody_signoffs').children();
var all_rows = rows;
- $('#signoffs_filter .arch_filter').each(function() {
+ /* apply arch and repo filters */
+ $('#signoffs_filter .arch_filter').add(
+ '#signoffs_filter .repo_filter').each(function() {
if (!$(this).is(':checked')) {
rows = rows.not('.' + $(this).val());
}
});
+ /* and then the slightly more expensive pending check */
if ($('#id_pending').is(':checked')) {
rows = rows.has('td.signoff-no');
}
/* 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');
}
function filter_signoffs_reset() {
$('#signoffs_filter .arch_filter').attr('checked', 'checked');
+ $('#signoffs_filter .repo_filter').attr('checked', 'checked');
$('#id_pending').removeAttr('checked');
filter_signoffs();
}