Update To Calculation scripts

Updated script to show the bar weight if user hits LIFT without entering a weight. Still need to resolve if you enter a weight less than 5lbs heavier than the bar.
This commit is contained in:
2018-10-29 15:21:36 -04:00
parent 04c8360ece
commit 9032402dc9

View File

@@ -151,6 +151,13 @@
//show reset button on calculate
jQuery(".input-calculate").click(function(){
//sets bar weight to current inputed bar weight
var bar = jQuery(".input-bar").val();
//checks if the weight input is less than or equal to the bar weight. If it is, update the weigh input and final weight display.
if (jQuery(".input-weight").val() <= bar) {
jQuery(".input-weight").val(bar);
jQuery(".input-final").html(bar);
}
jQuery(".b-infoentry__reset, .b-platevisual__weightfinal").show();
if (jQuery(".b-platevisual__weightdifference").text() != "Offset: 0 LBS") {
jQuery(".b-platevisual__weightdifference").show();