summaryrefslogtreecommitdiff
path: root/sitestatic
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-07-23 22:22:49 -0500
committerDan McGee <dan@archlinux.org>2012-07-23 22:22:49 -0500
commitb1206a4109d3b13b06c3116ef3a2dd6c9e125a1f (patch)
treed577e305025c1d2677cb6adb903a1127e69895e2 /sitestatic
parent5b176fc672a89cc3711a6e581d076ad8be25c516 (diff)
Enable filtering of todolist packages
This matches the filtering options we have on the signoffs and package differences pages. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'sitestatic')
-rw-r--r--sitestatic/archweb.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/sitestatic/archweb.js b/sitestatic/archweb.js
index b04b1d01..e6d73414 100644
--- a/sitestatic/archweb.js
+++ b/sitestatic/archweb.js
@@ -279,6 +279,29 @@ function todolist_flag() {
return false;
}
+function filter_todolist() {
+ /* start with all rows, and then remove ones we shouldn't show */
+ var rows = $('#dev-todo-pkglist tbody').children();
+ var all_rows = rows;
+ /* apply the filters, cheaper ones first */
+ if ($('#id_mine_only').is(':checked')) {
+ rows = rows.filter('.mine');
+ }
+ if ($('#id_incomplete').is(':checked')) {
+ rows = rows.has('.incomplete');
+ }
+ /* hide all rows, then show the set we care about */
+ all_rows.hide();
+ rows.show();
+ /* make sure we update the odd/even styling from sorting */
+ $('.results').trigger('applyWidgets');
+}
+function filter_todolist_reset() {
+ $('#id_incomplete').removeAttr('checked');
+ $('#id_mine_only').removeAttr('checked');
+ filter_todolist();
+}
+
/* signoffs.html */
function signoff_package() {
var link = this;