[WIP] Simplified overviews on mobile (#1115)

* Simplified stock overview on mobile.

* Stock table horizontally scrollable

* Use the new mobile views for all pages (except the shopping list page, use the existing special handling there for now)
And add a clear filter button to all pages

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
This commit is contained in:
4lloyd
2020-11-07 14:53:45 +01:00
committed by GitHub
parent 9aa9bd1cc7
commit 76cbf796b6
63 changed files with 948 additions and 156 deletions

View File

@@ -7,6 +7,8 @@
});
$('#products-table tbody').removeClass("d-none");
productsTable.columns.adjust().draw();
$('.dataTables_scrollBody').addClass("dragscroll");
dragscroll.reset();
$("#search").on("keyup", Delay(function()
{
@@ -30,6 +32,14 @@ $("#product-group-filter").on("change", function()
productsTable.column(7).search(value).draw();
});
$("#clear-filter-button").on("click", function()
{
$("#search").val("");
$("#product-group-filter").val("all");
productsTable.column(7).search("").draw();
productsTable.search("").draw();
});
if (typeof GetUriParam("product-group") !== "undefined")
{
$("#product-group-filter").val(GetUriParam("product-group"));