From b1206a4109d3b13b06c3116ef3a2dd6c9e125a1f Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 23 Jul 2012 22:22:49 -0500 Subject: Enable filtering of todolist packages This matches the filtering options we have on the signoffs and package differences pages. Signed-off-by: Dan McGee --- sitestatic/archweb.js | 23 +++++++++++++++++++++++ templates/packages/differences.html | 3 +-- templates/todolists/view.html | 22 ++++++++++++++++++++-- 3 files changed, 44 insertions(+), 4 deletions(-) diff --git a/sitestatic/archweb.js b/sitestatic/archweb.js index b04b1d0..e6d7341 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; diff --git a/templates/packages/differences.html b/templates/packages/differences.html index 8d6887a..b0c5b53 100644 --- a/templates/packages/differences.html +++ b/templates/packages/differences.html @@ -8,7 +8,7 @@ {% if differences %}

Package Differences by Architecture

-
+

Filter Differences View

@@ -29,7 +29,6 @@
- {# TODO some sort of spacing here #} diff --git a/templates/todolists/view.html b/templates/todolists/view.html index c774c9c..69595e1 100644 --- a/templates/todolists/view.html +++ b/templates/todolists/view.html @@ -29,6 +29,20 @@
  • {{ svn_root }}
  • {% endfor %} +
    +

    Filter Todolist Packages

    +
    +
    + Select filter criteria +
    +
    +
    +
    +
    +
    + +
    +
    @@ -42,7 +56,7 @@ {% for pkg in list.packages %} - + @@ -74,12 +88,16 @@ {% endblock %} -- cgit v1.2.3-24-g4f1b
    {{ pkg.pkg.arch.name }} {{ pkg.pkg.repo.name|capfirst }} {% pkg_details_link pkg.pkg %}