Correctly filter books with no tags. re #109
This commit is contained in:
parent
9ef3879e97
commit
dd191cf97d
12
util.js
12
util.js
|
@ -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 ();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue