Implemented tare weight handling (closes #132)

This commit is contained in:
Bernd Bestel
2019-03-05 17:51:50 +01:00
parent 90291fdbca
commit 8504429f5f
21 changed files with 221 additions and 84 deletions

View File

@@ -169,6 +169,8 @@ $('.input-group-qu').on('change', function(e)
$('#qu-conversion-info').addClass('d-none');
}
$("#tare_weight_qu_info").text($("#qu_id_stock option:selected").text());
Grocy.FrontendHelpers.ValidateForm('product-form');
});
@@ -199,6 +201,20 @@ $('#product-form input').keydown(function(event)
}
});
$("#enable_tare_weight_handling").on("click", function()
{
if (this.checked)
{
$("#tare_weight").removeAttr("disabled");
}
else
{
$("#tare_weight").attr("disabled", "");
}
Grocy.FrontendHelpers.ValidateForm("product-form");
});
Grocy.DeleteProductPictureOnSave = false;
$('#delete-current-product-picture-button').on('click', function (e)
{