From 48ca0f2ac76ae13ec2321d1020e2c6b70bb5ea83 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Sat, 11 Aug 2018 14:16:11 +0200 Subject: [PATCH] Also clear the shopping list without reloading the whole page --- public/viewjs/shoppinglist.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/viewjs/shoppinglist.js b/public/viewjs/shoppinglist.js index 085058e9..d03d9941 100644 --- a/public/viewjs/shoppinglist.js +++ b/public/viewjs/shoppinglist.js @@ -75,7 +75,10 @@ $(document).on('click', '#clear-shopping-list', function(e) Grocy.Api.Get('stock/clear-shopping-list', function(result) { - window.location.href = U('/shoppinglist'); + $('#shoppinglist-table tbody tr').fadeOut(500, function() + { + $(this).remove(); + }); }, function(xhr) {