mirror of
https://github.com/grocy/grocy.git
synced 2025-08-19 11:48:55 +00:00
Make info bars clickable and add a filter for them on all overview pages (references #60)
This commit is contained in:
@@ -25,6 +25,27 @@ $("#search").on("keyup", function()
|
||||
choresOverviewTable.search(value).draw();
|
||||
});
|
||||
|
||||
$("#status-filter").on("change", function()
|
||||
{
|
||||
var value = $(this).val();
|
||||
if (value === "all")
|
||||
{
|
||||
value = "";
|
||||
}
|
||||
|
||||
// Transfer CSS classes of selected element to dropdown element (for background)
|
||||
$(this).attr("class", $("#" + $(this).attr("id") + " option[value='" + value + "']").attr("class") + " form-control");
|
||||
|
||||
choresOverviewTable.column(4).search(value).draw();
|
||||
});
|
||||
|
||||
$(".status-filter-button").on("click", function()
|
||||
{
|
||||
var value = $(this).data("status-filter");
|
||||
$("#status-filter").val(value);
|
||||
$("#status-filter").trigger("change");
|
||||
});
|
||||
|
||||
$(document).on('click', '.track-chore-button', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
|
Reference in New Issue
Block a user