# HG changeset patch # User Michiel Broek # Date 1659813321 -7200 # Node ID 35207369e7ce035dbcc635508bc642573839a844 # Parent aa0a9b1a2dd79ab36fd3e8884122057e6dd1cf9f Packagig is now a viewer. diff -r aa0a9b1a2dd7 -r 35207369e7ce www/js/prod_edit.js --- a/www/js/prod_edit.js Sat Aug 06 20:40:26 2022 +0200 +++ b/www/js/prod_edit.js Sat Aug 06 21:15:21 2022 +0200 @@ -1149,6 +1149,7 @@ calcYeast(); kookTijd(); calcFermentation(); + calcCarbonation(); $('#FLog').jqxButton({ disabled: (dataRecord.log_fermentation) ? false : true}); $('#ILog').jqxButton({ disabled: (dataRecord.log_ispindel) ? false : true}); $('#CLog').jqxButton({ disabled: (dataRecord.log_co2pressure) ? false : true}); @@ -1425,11 +1426,11 @@ if (fermentableInit) { if (row.f_added == 4) { $('#bottle_priming_total').val(row.f_amount * 1000); // Prevent clearing - $('#bottle_priming_sugar').jqxDropDownList('selectItem', row.f_name); + $('#bottle_priming_sugar').val(row.f_name); } if (row.f_added == 5) { $('#keg_priming_total').val(row.f_amount * 1000); - $('#keg_priming_sugar').jqxDropDownList('selectItem', row.f_name); + $('#keg_priming_sugar').val(row.f_name); } } // Check supplies. @@ -3310,7 +3311,6 @@ $('#brew_fermenter_ibu,#brew_fermenter_color').jqxNumberInput(Show0dec); // Tab 10, Fermentation - // Note, fermentation temps changes must do calcCarbonation() $('#brew_fermenter_sg2').jqxTooltip({ content: 'Het behaalde SG in het gistvat, overgenomen van de brouwdag.' }); $('#primary_start_temp').jqxTooltip({ content: 'De begintemperatuur van de hoofdvergisting.' }); $('#primary_max_temp').jqxTooltip({ content: 'De hoogst bereikte piek temperatuur tijdens de hoofgvergisting.' }); @@ -3360,125 +3360,21 @@ $('#bottle_priming_water,#keg_priming_water').jqxTooltip({ content: 'De hoeveelheid water om de suiker op te lossen.' }); $('#bottle_pressure').jqxTooltip({ content: 'De maximaal te verwachten druk tijdens het hergisten.' }); $('#package_date').jqxDateTimeInput(Dateopts); - $('#package_infuse_amount').jqxNumberInput(Spin3dec); + $('#package_date').jqxDateTimeInput({ disabled: true }); + $('#package_infuse_amount').jqxNumberInput(Show3dec); $('#package_infuse_notes').jqxInput({ theme: theme, width: 640, height: 23 }); $('#package_abv').jqxNumberInput(Show2dec); - $('#package_ph').jqxNumberInput(SpinpH); + $('#package_ph').jqxNumberInput(Show2dec); $('#st_carb_min2,#st_carb_max2').jqxNumberInput(Smal1dec); - $('#package_volume,#package_infuse_abv,#bottle_amount,#keg_amount').jqxNumberInput(Spin1dec); - $('#bottle_carbonation,#keg_carbonation').jqxNumberInput(Spin2dec); - $('#bottle_carbonation,#keg_carbonation').jqxNumberInput({ max: 5 }); - $('#bottle_priming_sugar').jqxDropDownList({ - placeHolder: 'Kies suiker:', - theme: theme, - source: fermentablesugars, - displayMember: 'name', - width: 200, - height: 23, - dropDownWidth: 300, - dropDownHeight: 400 - }); - $('#bottle_priming_sugar').on('select', function(event) { - if (event.args) { - var rowID, index, editrow = -1, datarecord, rows, i, row = {}; - index = event.args.index; - datarecord = fermentablesugars.records[index]; - rows = $('#fermentableGrid').jqxGrid('getrows'); - for (i = 0; i < rows.length; i++) { - if (rows[i].f_added == 4) { - editrow = i; - } - } - row['f_name'] = datarecord.name; - row['f_origin'] = datarecord.origin; - row['f_supplier'] = datarecord.supplier; - row['f_amount'] = parseFloat($('#bottle_priming_total').jqxNumberInput('decimal')) / 1000; - row['f_cost'] = datarecord.cost; - row['f_type'] = datarecord.type; - row['f_yield'] = datarecord.yield; - row['f_color'] = datarecord.color; - row['f_coarse_fine_diff'] = datarecord.coarse_fine_diff; - row['f_moisture'] = datarecord.moisture; - row['f_diastatic_power'] = datarecord.diastatic_power; - row['f_protein'] = datarecord.protein; - row['f_max_in_batch'] = datarecord.max_in_batch; - row['f_graintype'] = datarecord.graintype; - row['f_added'] = 4; - row['f_dissolved_protein'] = datarecord.dissolved_protein; - row['f_recommend_mash'] = datarecord.recommend_mash; - row['f_add_after_boil'] = 1; - row['f_adjust_to_total_100'] = 0; - row['f_percentage'] = 0; - row['f_di_ph'] = datarecord.di_ph; - row['f_acid_to_ph_57'] = datarecord.acid_to_ph_57; - row['f_inventory'] = datarecord.inventory; - if (editrow >= 0) { - rowID = $('#fermentableGrid').jqxGrid('getrowid', editrow); - $('#fermentableGrid').jqxGrid('updaterow', rowID, row); - } else { - $('#fermentableGrid').jqxGrid('addrow', null, row); - } -// calcCarbonation(); - } - }); - $('#keg_priming_sugar').jqxDropDownList({ - placeHolder: 'Kies suiker:', - theme: theme, - source: fermentablesugars, - displayMember: 'name', - width: 200, - height: 23, - dropDownWidth: 300, - dropDownHeight: 400 - }); - $('#keg_priming_sugar').on('select', function(event) { - if (event.args) { - var rowID, index, editrow = -1, datarecord, rows, i, row = {}; - index = event.args.index; - datarecord = fermentablesugars.records[index]; - rows = $('#fermentableGrid').jqxGrid('getrows'); - for (i = 0; i < rows.length; i++) { - if (rows[i].f_added == 5) { - editrow = i; - } - } - row['f_name'] = datarecord.name; - row['f_origin'] = datarecord.origin; - row['f_supplier'] = datarecord.supplier; - row['f_amount'] = parseFloat($('#keg_priming_total').jqxNumberInput('decimal')) / 1000; - row['f_cost'] = datarecord.cost; - row['f_type'] = datarecord.type; - row['f_yield'] = datarecord.yield; - row['f_color'] = datarecord.color; - row['f_coarse_fine_diff'] = datarecord.coarse_fine_diff; - row['f_moisture'] = datarecord.moisture; - row['f_diastatic_power'] = datarecord.diastatic_power; - row['f_protein'] = datarecord.protein; - row['f_max_in_batch'] = datarecord.max_in_batch; - row['f_graintype'] = datarecord.graintype; - row['f_added'] = 5; - row['f_dissolved_protein'] = datarecord.dissolved_protein; - row['f_recommend_mash'] = datarecord.recommend_mash; - row['f_add_after_boil'] = 1; - row['f_adjust_to_total_100'] = 0; - row['f_percentage'] = 0; - row['f_di_ph'] = datarecord.di_ph; - row['f_acid_to_ph_57'] = datarecord.acid_to_ph_57; - row['f_inventory'] = datarecord.inventory; - if (editrow >= 0) { - rowID = $('#fermentableGrid').jqxGrid('getrowid', editrow); - $('#fermentableGrid').jqxGrid('updaterow', rowID, row); - } else { - $('#fermentableGrid').jqxGrid('addrow', null, row); - } -// calcCarbonation(); - } - }); - $('#bottle_priming_water,#keg_priming_water').jqxNumberInput(Spin3dec); - $('#keg_forced_carb').jqxCheckBox({ theme: theme, width: 120, height: 23 }); + $('#package_volume,#package_infuse_abv,#bottle_amount,#keg_amount').jqxNumberInput(Show1dec); + $('#bottle_carbonation,#keg_carbonation').jqxNumberInput(Show2dec); + $('#bottle_priming_sugar').jqxInput({ theme: theme, width: 200, height: 23 }); + $('#keg_priming_sugar').jqxInput({ theme: theme, width: 200, height: 23 }); + $('#bottle_priming_water,#keg_priming_water').jqxNumberInput(Show3dec); + $('#keg_forced_carb').jqxCheckBox({ theme: theme, width: 120, height: 23, disabled: true }); $('#bottle_priming_amount,#keg_priming_amount,#bottle_priming_total,#bottle_pressure,#keg_priming_total,#keg_pressure').jqxNumberInput(Show1dec); $('#bottle_abv,#keg_abv').jqxNumberInput(Show2dec); - $('#bottle_carbonation_temp,#keg_carbonation_temp').jqxNumberInput(YeastT); + $('#bottle_carbonation_temp,#keg_carbonation_temp').jqxNumberInput(Show1dec); $('#CLog').jqxButton({ template: 'info', width: '150px', theme: theme }); $('#CLog').click(function() { // Open log in a new tab. diff -r aa0a9b1a2dd7 -r 35207369e7ce www/prod_edit.php --- a/www/prod_edit.php Sat Aug 06 20:40:26 2022 +0200 +++ b/www/prod_edit.php Sat Aug 06 21:15:21 2022 +0200 @@ -829,9 +829,9 @@ Suiker: -
+ Suiker: -
+ Toevoegen suiker g/L: