mirror of
https://github.com/grocy/grocy.git
synced 2025-08-15 18:26:00 +00:00
Finished first version of "pictures for products" (references #58)
This commit is contained in:
@@ -141,15 +141,20 @@ $(document).on('click', '.product-consume-button', function(e)
|
||||
);
|
||||
});
|
||||
|
||||
$(document).on("click", ".show-product-picture-button", function(e)
|
||||
$(document).on("click", ".product-name-cell", function(e)
|
||||
{
|
||||
var pictureUrl = $(e.currentTarget).attr("data-picture-url");
|
||||
var productName = $(e.currentTarget).attr("data-product-name");
|
||||
var productHasPicture = BoolVal($(e.currentTarget).attr("data-product-has-picture"));
|
||||
|
||||
bootbox.alert({
|
||||
title: L("Image of product #1", productName),
|
||||
message: "<img src='" + pictureUrl + "' class='img-fluid'>"
|
||||
});
|
||||
if (productHasPicture)
|
||||
{
|
||||
var pictureUrl = $(e.currentTarget).attr("data-picture-url");
|
||||
var productName = $(e.currentTarget).attr("data-product-name");
|
||||
|
||||
bootbox.alert({
|
||||
title: L("Image of product #1", productName),
|
||||
message: "<img src='" + pictureUrl + "' class='img-fluid'>"
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function RefreshStatistics()
|
||||
|
Reference in New Issue
Block a user