mirror of
https://github.com/grocy/grocy.git
synced 2025-10-12 16:44:55 +00:00
[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:
@@ -16,6 +16,8 @@
|
||||
});
|
||||
$('#recipes-table tbody').removeClass("d-none");
|
||||
recipesTables.columns.adjust().draw();
|
||||
$('.dataTables_scrollBody').addClass("dragscroll");
|
||||
dragscroll.reset();
|
||||
|
||||
if ((typeof GetUriParam("tab") !== "undefined" && GetUriParam("tab") === "gallery") || window.localStorage.getItem("recipes_last_tab_id") == "gallery-tab")
|
||||
{
|
||||
@@ -66,6 +68,14 @@ $("#search").on("keyup", Delay(function()
|
||||
$(".recipe-gallery-item .card-title:not(:contains_case_insensitive(" + value + "))").parent().parent().parent().addClass("d-none");
|
||||
}, 200));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
$("#search").val("");
|
||||
$("#status-filter").val("all");
|
||||
$("#search").trigger("keyup");
|
||||
$("#status-filter").trigger("change");
|
||||
});
|
||||
|
||||
$("#status-filter").on("change", function()
|
||||
{
|
||||
var value = $(this).val();
|
||||
|
Reference in New Issue
Block a user