Correctly filter books with no tags. re #109

This commit is contained in:
Sébastien Lucas 2013-12-13 20:53:40 +01:00
parent 9ef3879e97
commit dd191cf97d
1 changed files with 12 additions and 0 deletions

12
util.js
View File

@ -188,6 +188,18 @@ function doFilter () {
}
if (toBeFiltered) { $(this).parents (".books").addClass ("filtered"); }
});
// Handle the books with no tags
var atLeastOneTagSelected = false;
for (var filter in filterList) {
if (filterList [filter] === true) {
atLeastOneTagSelected = true;
}
}
if (atLeastOneTagSelected) {
$(".books").not (":has(span.se)").addClass ("filtered");
}
updateFilters ();
}