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

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 ();
}