mirror of
https://github.com/grocy/grocy.git
synced 2025-10-15 09:46:03 +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:
@@ -7,6 +7,8 @@
|
||||
});
|
||||
$('#batteries-overview-table tbody').removeClass("d-none");
|
||||
batteriesOverviewTable.columns.adjust().draw();
|
||||
$('.dataTables_scrollBody').addClass("dragscroll");
|
||||
dragscroll.reset();
|
||||
|
||||
$("#search").on("keyup", Delay(function()
|
||||
{
|
||||
@@ -19,6 +21,14 @@ $("#search").on("keyup", Delay(function()
|
||||
batteriesOverviewTable.search(value).draw();
|
||||
}, 200));
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
$("#search").val("");
|
||||
$("#status-filter").val("all");
|
||||
batteriesOverviewTable.column(4).search("").draw();
|
||||
batteriesOverviewTable.search("").draw();
|
||||
});
|
||||
|
||||
$("#status-filter").on("change", function()
|
||||
{
|
||||
var value = $(this).val();
|
||||
@@ -135,8 +145,8 @@ function RefreshStatistics()
|
||||
}
|
||||
});
|
||||
|
||||
$("#info-due-batteries").text(__n(dueCount, '%s battery is due to be charged', '%s batteries are due to be charged') + ' ' + __n(nextXDays, 'within the next day', 'within the next %s days'));
|
||||
$("#info-overdue-batteries").text(__n(overdueCount, '%s battery is overdue to be charged', '%s batteries are overdue to be charged'));
|
||||
$("#info-due-batteries").html('<span class="d-block d-md-none">' + dueCount + ' <i class="fas fa-clock"></i></span><span class="d-none d-md-block">' + __n(dueCount, '%s battery is due to be charged', '%s batteries are due to be charged') + ' ' + __n(nextXDays, 'within the next day', 'within the next %s days'));
|
||||
$("#info-overdue-batteries").html('<span class="d-block d-md-none">' + overdueCount + ' <i class="fas fa-times-circle"></i></span><span class="d-none d-md-block">' + __n(overdueCount, '%s battery is overdue to be charged', '%s batteries are overdue to be charged'));
|
||||
},
|
||||
function(xhr)
|
||||
{
|
||||
|
Reference in New Issue
Block a user