mirror of
https://github.com/grocy/grocy.git
synced 2026-03-27 23:29:25 +01:00
48 lines
1019 B
JavaScript
48 lines
1019 B
JavaScript
$(document).on("click", ".print-all-locations-button", function(e)
|
|
{
|
|
$(".page").removeClass("d-print-none").removeClass("no-page-break");
|
|
$(".print-timestamp").text(moment().format("l LT"));
|
|
window.print();
|
|
});
|
|
|
|
$(document).on("click", ".print-single-location-button", function(e)
|
|
{
|
|
$(".page").addClass("d-print-none");
|
|
$(e.currentTarget).closest(".page").removeClass("d-print-none").addClass("no-page-break");
|
|
$(".print-timestamp").text(moment().format("l LT"));
|
|
window.print();
|
|
});
|
|
|
|
$("#include-out-of-stock").change(function()
|
|
{
|
|
if (this.checked)
|
|
{
|
|
RemoveUriParam("include_out_of_stock");
|
|
}
|
|
else
|
|
{
|
|
UpdateUriParam("include_out_of_stock", true);
|
|
}
|
|
|
|
window.location.reload();
|
|
});
|
|
|
|
if (GetUriParam("include_out_of_stock"))
|
|
{
|
|
$("#include-out-of-stock").prop("checked", false);
|
|
}
|
|
|
|
$(document).on("change", "#leaf-locations-only", function()
|
|
{
|
|
if (this.checked)
|
|
{
|
|
UpdateUriParam("leaf_locations_only", true);
|
|
}
|
|
else
|
|
{
|
|
RemoveUriParam("leaf_locations_only");
|
|
}
|
|
|
|
window.location.reload();
|
|
});
|