mirror of
https://github.com/grocy/grocy.git
synced 2025-08-15 10:14:39 +00:00
Make it possible to hide chores/batteries (closes #1069)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user