Make it possible to hide chores/batteries (closes #1069)

This commit is contained in:
Bernd Bestel
2020-12-20 10:19:44 +01:00
parent 31dbb95c58
commit 268b8e87d7
17 changed files with 239 additions and 23 deletions

View File

@@ -23,6 +23,7 @@ $("#clear-filter-button").on("click", function()
{
$("#search").val("");
choresTable.search("").draw();
$("#show-disabled").prop('checked', false);
});
$(document).on('click', '.chore-delete-button', function(e)
@@ -61,3 +62,20 @@ $(document).on('click', '.chore-delete-button', function(e)
}
});
});
$("#show-disabled").change(function()
{
if (this.checked)
{
window.location.href = U('/chores?include_disabled');
}
else
{
window.location.href = U('/chores');
}
});
if (GetUriParam('include_disabled'))
{
$("#show-disabled").prop('checked', true);
}