mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Unified product-/chore-/battery-card modal handling
This commit is contained in:
@@ -24,3 +24,9 @@ Grocy.Components.BatteryCard.Refresh = function(batteryId)
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
$(document).on("click", ".batterycard-trigger", function(e)
|
||||
{
|
||||
Grocy.Components.BatteryCard.Refresh($(e.currentTarget).attr("data-battery-id"));
|
||||
$("#batterycard-modal").modal("show");
|
||||
});
|
||||
|
@@ -48,3 +48,9 @@ Grocy.Components.ChoreCard.Refresh = function(choreId)
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
$(document).on("click", ".chorecard-trigger", function(e)
|
||||
{
|
||||
Grocy.Components.ChoreCard.Refresh($(e.currentTarget).attr("data-chore-id"));
|
||||
$("#chorecard-modal").modal("show");
|
||||
});
|
||||
|
@@ -265,3 +265,13 @@ $("#productcard-product-description").on("hidden.bs.collapse", function()
|
||||
{
|
||||
$(".expandable-text").find("a[data-toggle='collapse']").text(__t("Show more"));
|
||||
})
|
||||
|
||||
$(document).on("click", ".productcard-trigger", function(e)
|
||||
{
|
||||
var productId = $(e.currentTarget).attr("data-product-id");
|
||||
if (productId != "")
|
||||
{
|
||||
Grocy.Components.ProductCard.Refresh(productId);
|
||||
$("#productcard-modal").modal("show");
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user