Commit eee8c3cf authored by ransome1's avatar ransome1
Browse files

Fixed missing result stats when filtering complete categories

parent a87c302b
......@@ -1037,7 +1037,7 @@ nav ul:nth-child(2) {
.modal.content .modal-card {
z-index: 60;
background: #ebebeb;
padding: 0 2em;
padding: 2em;
border-radius: 0.25rem;
}
.modal.content .modal-background {
......@@ -1094,7 +1094,7 @@ nav ul:nth-child(2) {
flex-shrink: 0;
}
.modal.content .tabs li a {
border-width: 2px;
border-width: 3px;
margin-bottom: 0;
}
......@@ -5606,7 +5606,7 @@ button.dropdown-item.is-active {
.modal-card {
margin: 0 auto;
max-height: calc(100vh - 40px);
width: 80%;
width: 900px;
}
}
......
This diff is collapsed.
......@@ -85,6 +85,15 @@ function filterItems(items, searchString) {
}
});
}
// apply persisted excluded categories filter
if(userData.hideFilterCategories.length > 0) {
// we iterate through the filters in the order they got selected
userData.hideFilterCategories.forEach(filter => {
items = items.filter(function(item) {
if(!item[filter]) return item;
});
});
}
// apply filters or filter by search string
items = items.filter(function(item) {
if(todoTableSearch.value) searchString = todoTableSearch.value;
......
......@@ -231,6 +231,7 @@ function show(todo, templated) {
// in case the more toggle menu is open we close it
showMore(false);
datePickerInput.value = null;
recurrencePickerInput.value = null;
modalForm.classList.toggle("is-active");
document.getElementById("modalFormInput").value = null;
document.getElementById("modalFormInput").focus();
......
......@@ -54,12 +54,12 @@ let
stopBuilding = false,
visibleRows = 0;
todoTableWrapper.addEventListener("scroll", function(event) {
if(Math.floor(event.target.scrollHeight - event.target.scrollTop) <= event.target.clientHeight && visibleRows<items.filtered.length) {
stopBuilding = false;
startBuilding(null, true);
}
});
todoTableWrapper.addEventListener("scroll", function(event) {
if(Math.floor(event.target.scrollHeight - event.target.scrollTop) <= event.target.clientHeight && visibleRows<items.filtered.length) {
stopBuilding = false;
startBuilding(null, true);
}
});
function configureTodoTableTemplate(append) {
try {
......@@ -567,9 +567,9 @@ async function archiveTodos() {
function checkIsTodoVisible(todo) {
if(!userData.showHidden && todo.h) return false
if(!todo.text) return false
for(let category in userData.hideFilterCategories) {
/*for(let category in userData.hideFilterCategories) {
if(todo[userData.hideFilterCategories[category]]) return false
}
}*/
return true;
}
function generateNotification(todo, offset) {
......
......@@ -1004,7 +1004,7 @@ nav {
.modal-card {
z-index: 60;
background: $light-grey;
padding: 0 2em;
padding: 2em;
border-radius: 0.25rem;
}
.modal-background {
......@@ -1062,12 +1062,8 @@ nav {
.tabs {
display: flex;
flex-shrink: 0;
//display: block;
//height: 4em;
//margin-bottom: 0;
//overflow-x: shown;
li a {
border-width: 2px;
border-width: 3px;
margin-bottom: 0;
}
}
......
......@@ -23,4 +23,4 @@ $modal-background-background-color: rgba(0, 0, 0, 0.25);
$modal-z: 50;
$family-sans-serif: "FreeSans", Helvetica, "Arial Unicode MS", Arial, "Noto Sans", "DejaVu Sans", "Microsoft JhengHei", "微軟正黑體", "Microsoft YaHei", sans-serif;
$modal-content-width: 80%;
$modal-content-width: 900px;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment