mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Added a "Clear done items" button to the shopping list (closes #1999)
This commit is contained in:
@@ -236,6 +236,20 @@ $(document).on('click', '#clear-shopping-list', function(e)
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on("click", "#clear-done-items", function(e)
|
||||
{
|
||||
Grocy.Api.Post('stock/shoppinglist/clear', { "list_id": $("#selected-shopping-list").val(), "done_only": true },
|
||||
function(result)
|
||||
{
|
||||
window.location.reload();
|
||||
},
|
||||
function(xhr)
|
||||
{
|
||||
console.error(xhr);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$(document).on('click', '.shopping-list-stock-add-workflow-list-item-button', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
|
Reference in New Issue
Block a user