mirror of
https://github.com/grocy/grocy.git
synced 2025-08-17 19:16:37 +00:00
Make info bars clickable and add a filter for them on all overview pages (references #60)
This commit is contained in:
@@ -29,6 +29,27 @@ $("#search").on("keyup", function()
|
||||
tasksTable.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");
|
||||
|
||||
tasksTable.column(5).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', '.do-task-button', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
|
Reference in New Issue
Block a user