summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2014-03-09 18:02:00 +0100
committerDan McGee <dan@archlinux.org>2014-03-09 18:02:00 +0100
commit3f1ca4da2a0e29850eadec7a8d69444081da099c (patch)
tree299cdc105628d31b3c1618523cfc43fcc393b562
parent268317dd331bcdbe1c2828583034c0274a19eea3 (diff)
downloadarchweb-3f1ca4da2a0e29850eadec7a8d69444081da099c.tar.gz
archweb-3f1ca4da2a0e29850eadec7a8d69444081da099c.tar.xz
Simplify filter reload code
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--sitestatic/archweb.js11
1 files changed, 3 insertions, 8 deletions
diff --git a/sitestatic/archweb.js b/sitestatic/archweb.js
index 0a97949..0c4059a 100644
--- a/sitestatic/archweb.js
+++ b/sitestatic/archweb.js
@@ -376,10 +376,7 @@ function filter_todolist_load(list_id) {
if (!state)
return;
state = JSON.parse(state);
- $('#todolist_filter .arch_filter').removeAttr('checked');
- $('#todolist_filter .repo_filter').removeAttr('checked');
- $('#id_incomplete').removeAttr('checked');
- $('#id_mine_only').removeAttr('checked');
+ $('#todolist_filter input[type="checkbox"]').removeAttr('checked');
$.each(state, function (i, v) {
// this assumes our only filters are checkboxes
$('#todolist_filter input[name="' + v['name'] + '"]').attr('checked', 'checked');
@@ -395,7 +392,7 @@ function filter_report_load(report_id) {
if (!state)
return;
state = JSON.parse(state);
- $('#report_filter input[type="checkbox"]').removeAttr('checked')
+ $('#report_filter input[type="checkbox"]').removeAttr('checked');
$.each(state, function (i, v) {
// this assumes our only filters are checkboxes
$('#report_filter input[name="' + v['name'] + '"]').attr('checked', 'checked');
@@ -496,9 +493,7 @@ function filter_signoffs_load() {
if (!state)
return;
state = JSON.parse(state);
- $('#signoffs_filter .arch_filter').removeAttr('checked');
- $('#signoffs_filter .repo_filter').removeAttr('checked');
- $('#id_pending').removeAttr('checked');
+ $('#signoffs_filter input[type="checkbox"]').removeAttr('checked');
$.each(state, function (i, v) {
// this assumes our only filters are checkboxes
$('#signoffs_filter input[name="' + v['name'] + '"]').attr('checked', 'checked');