Make info bars clickable and add a filter for them on all overview pages (references #60)

This commit is contained in:
Bernd Bestel
2018-09-24 19:13:53 +02:00
parent 067a10e1b2
commit 7401971884
12 changed files with 188 additions and 17 deletions

View File

@@ -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();