Show product count per group on the product groups page and added a link to the products page filtered by the current product group (closes #174)

This commit is contained in:
Bernd Bestel
2019-04-05 21:08:30 +02:00
parent 40cc0ff280
commit 886e272c03
4 changed files with 35 additions and 1 deletions

View File

@@ -32,6 +32,23 @@ $("#search").on("keyup", function()
productsTable.search(value).draw();
});
$("#product-group-filter").on("change", function()
{
var value = $("#product-group-filter option:selected").text();
if (value === L("All"))
{
value = "";
}
productsTable.column(7).search(value).draw();
});
if (typeof GetUriParam("product-group") !== "undefined")
{
$("#product-group-filter").val(GetUriParam("product-group"));
$("#product-group-filter").trigger("change");
}
$(document).on('click', '.product-delete-button', function (e)
{
var objectName = $(e.currentTarget).attr('data-product-name');