# HG changeset patch # User Michiel Broek # Date 1549739661 -3600 # Node ID 4767a790d1f647f05a7e20007e9506851e3600cb # Parent 28953f9fc5b4024af4383bcaab5361d6589c20f2 Progress bars have color ranges. More var definitions for input fields. diff -r 28953f9fc5b4 -r 4767a790d1f6 www/js/global.js --- a/www/js/global.js Sat Feb 09 16:49:04 2019 +0100 +++ b/www/js/global.js Sat Feb 09 20:14:21 2019 +0100 @@ -385,6 +385,13 @@ // options for editors +var Show1wat = { inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }; +var Show2wat = { inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 2, readOnly: true }; +var Show3wat = { inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 3, readOnly: true }; +var Show0dec = { inputMode: 'simple', theme: theme, width: 90, height: 23, readOnly: true, decimalDigits: 0 }; +var Show1dec = { inputMode: 'simple', theme: theme, width: 90, height: 23, readOnly: true, decimalDigits: 1 }; +var Show2dec = { inputMode: 'simple', theme: theme, width: 90, height: 23, readOnly: true, decimalDigits: 2 }; +var Show3dec = { inputMode: 'simple', theme: theme, width: 90, height: 23, readOnly: true, decimalDigits: 3 }; var SGopts = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0.990, max: 1.199, decimalDigits: 3, spinButtons: true }; var Spin1dec = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 1, spinButtons: true }; var Spin2dec = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 2, spinButtons: true }; diff -r 28953f9fc5b4 -r 4767a790d1f6 www/js/prod_edit.js --- a/www/js/prod_edit.js Sat Feb 09 16:49:04 2019 +0100 +++ b/www/js/prod_edit.js Sat Feb 09 20:14:21 2019 +0100 @@ -324,8 +324,11 @@ function calcIBUs() { var total_ibus = 0; var ferm_ibus = 0; + var rows = {}; hop_aroma = hop_flavour = 0; - var rows = $('#hopGrid').jqxGrid('getrows'); + if (!(rows = $('#hopGrid').jqxGrid('getrows'))) { + return; + } for (var i = 0; i < rows.length; i++) { var row = rows[i]; total_ibus += toIBU(row.h_useat, row.h_form, preboil_sg, parseFloat(dataRecord.batch_size), @@ -2996,7 +2999,7 @@ $("#st_og_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true }); $("#est_fg").jqxTooltip({ content: 'Het eind SG. Dit wordt automatisch berekend.' }); - $("#est_fg").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 3, readOnly: true }); + $("#est_fg").jqxNumberInput( Show3dec ); $("#st_fg_min").jqxTooltip({ content: 'Het minimum eind SG voor deze bierstijl.'}); $("#st_fg_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true }); $("#st_fg_max").jqxTooltip({ content: 'Het maximum eind SG voor deze bierstijl.'}); @@ -3010,7 +3013,7 @@ $("#st_abv_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true }); $("#est_color").jqxTooltip({ content: 'De kleur in EBC. Dit wordt automatisch berekend.' }); - $("#est_color").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 0, readOnly: true }); + $("#est_color").jqxNumberInput( Show0dec ); $("#st_color_min").jqxTooltip({ content: 'De minimum kleur voor deze bierstijl.'}); $("#st_color_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true }); $("#st_color_max").jqxTooltip({ content: 'De maximum kleur voor deze bierstijl.'}); @@ -3026,7 +3029,7 @@ }); $("#est_ibu").jqxTooltip({ content: 'De bitterheid in IBU. Dit wordt automatisch berekend.' }); - $("#est_ibu").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 0, readOnly: true }); + $("#est_ibu").jqxNumberInput( Show0dec ); $("#st_ibu_min").jqxTooltip({ content: 'De minimum bitterheid voor deze bierstijl.'}); $("#st_ibu_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true }); $("#st_ibu_max").jqxTooltip({ content: 'De maximum bitterheid voor deze bierstijl.'}); @@ -3053,46 +3056,77 @@ $("#eq_name").jqxTooltip({ content: 'De naam van deze brouw apparatuur.' }); $("#eq_name").jqxInput({ theme: theme, width: 250, height: 23 }); $("#eq_boil_size").jqxTooltip({ content: 'Normaal kook volume in liters' }); - $("#eq_boil_size").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); + $("#eq_boil_size").jqxNumberInput( Show1dec ); $("#eq_batch_size").jqxTooltip({ content: 'Berekende batch grootte in liters aan het eind van de kook.' }); - $("#eq_batch_size").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); + $("#eq_batch_size").jqxNumberInput( Show1dec ); $("#eq_tun_volume").jqxTooltip({ content: 'Maisch ketel volume.' }); - $("#eq_tun_volume").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); + $("#eq_tun_volume").jqxNumberInput( Show1dec ); $("#eq_top_up_water").jqxTooltip({ content: 'Extra water in het gistvat.' }); - $("#eq_top_up_water").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); + $("#eq_top_up_water").jqxNumberInput( Show1dec ); $("#eq_trub_chiller_loss").jqxTooltip({ content: 'Standaard verlies bij het overbrengen naar het gistvat.' }); - $("#eq_trub_chiller_loss").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); + $("#eq_trub_chiller_loss").jqxNumberInput( Show1dec ); $("#eq_evap_rate").jqxTooltip({ content: 'Verdamping in liters per uur.' }); - $("#eq_evap_rate").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 2, }); + $("#eq_evap_rate").jqxNumberInput( Show2dec ); $("#eq_boil_time").jqxTooltip({ content: 'Normale kooktijd in minuten.' }); - $("#eq_boil_time").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 0 }); + $("#eq_boil_time").jqxNumberInput( Show0dec ); $("#eq_top_up_kettle").jqxTooltip({ content: 'Extra water toevoegen tijdens de kook.' }); - $("#eq_top_up_kettle").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); + $("#eq_top_up_kettle").jqxNumberInput( Show1dec ); $("#eq_hop_utilization").jqxTooltip({ content: '100% voor kleine installaties, hoger voor grote brouwerijen.' }); - $("#eq_hop_utilization").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 0 }); + $("#eq_hop_utilization").jqxNumberInput( Show0dec ); $("#eq_notes").jqxTooltip({ content: 'Opmerkingen over deze apparatuur.' }); $("#eq_notes").jqxInput({ theme: theme, width: 960, height: 200 }); $("#eq_lauter_volume").jqxTooltip({ content: 'Filterkuip volume.' }); - $("#eq_lauter_volume").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); + $("#eq_lauter_volume").jqxNumberInput( Show1dec ); $("#eq_lauter_deadspace").jqxTooltip({ content: 'Filterkuip verlies in liters.' }); - $("#eq_lauter_deadspace").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); + $("#eq_lauter_deadspace").jqxNumberInput( Show1dec ); $("#eq_kettle_volume").jqxTooltip({ content: 'Kook ketel volume in liters.' }); - $("#eq_kettle_volume").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); + $("#eq_kettle_volume").jqxNumberInput( Show1dec ); $("#eq_mash_volume").jqxTooltip({ content: 'Maisch water voor de eerste stap.' }); - $("#eq_mash_volume").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); + $("#eq_mash_volume").jqxNumberInput( Show1dec ); $("#eq_mash_max").jqxTooltip({ content: 'De maximale moutstort in Kg.' }); - $("#eq_mash_max").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); + $("#eq_mash_max").jqxNumberInput( Show1dec ); $("#eq_efficiency").jqxTooltip({ content: 'Gemiddeld brouwzaal rendement.' }); - $("#eq_efficiency").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); + $("#eq_efficiency").jqxNumberInput( Show1dec ); // Tab 3, Fermentables $("#est_color2").jqxTooltip({ content: 'De kleur in EBC. Dit wordt automatisch berekend.' }); - $("#est_color2").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 0, readOnly: true }); + $("#est_color2").jqxNumberInput( Show0dec ); $("#est_og2").jqxTooltip({ content: 'Het geschatte begin SG van dit product.' }); - $("#est_og2").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 3, readOnly: true }); - $("#perc_malts").jqxProgressBar({ width: 300, height: 23, theme: theme, showText: true }); - $("#perc_sugars").jqxProgressBar({ width: 300, height: 23, theme: theme, showText: true }); - $("#perc_cara").jqxProgressBar({ width: 300, height: 23, theme: theme, showText: true }); + $("#est_og2").jqxNumberInput( Show3dec ); + $("#perc_malts").jqxProgressBar({ + width: 300, + height: 23, + theme: theme, + showText: true, + animationDuration: 0, + colorRanges: [ + { stop: 90, color: '#008C00' }, + { stop: 95, color: '#EB7331' }, + { stop: 100, color: '#FF0000' } + ] + }); + $("#perc_sugars").jqxProgressBar({ + width: 300, + height: 23, + theme: theme, + showText: true, + animationDuration: 0, + colorRanges: [ + { stop: 20, color: '#008C00' }, + { stop: 100, color: '#FF0000' } + ] + }); + $("#perc_cara").jqxProgressBar({ + width: 300, + height: 23, + theme: theme, + showText: true, + animationDuration: 0, + colorRanges: [ + { stop: 25, color: '#008C00' }, + { stop: 100, color: '#FF0000' } + ] + }); $("#popupFermentable").jqxWindow({ width: 800, height: 300, @@ -3292,8 +3326,31 @@ // Tab 4, Hops $("#est_ibu2").jqxTooltip({ content: 'De bitterheid in IBU. Dit wordt automatisch berekend.' }); $("#est_ibu2").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true }); - $("#hop_flavour").jqxProgressBar({ width: 300, height: 23, theme: theme, showText: true }); - $("#hop_aroma").jqxProgressBar({ width: 300, height: 23, theme: theme, showText: true }); + $("#hop_flavour").jqxProgressBar({ + width: 300, + height: 23, + theme: theme, + showText: true, + animationDuration: 0, + colorRanges: [ + { stop: 20, color: '#004D00' }, + { stop: 40, color: '#008C00' }, + { stop: 60, color: '#00BF00' }, + { stop: 80, color: '#00FF00' }, + { stop: 100, color: '#80FF80' } + ] + }); + $("#hop_aroma").jqxProgressBar({ + width: 300, height: 23, theme: theme, showText: true, + animationDuration: 0, + colorRanges: [ + { stop: 20, color: '#004D00' }, + { stop: 40, color: '#008C00' }, + { stop: 60, color: '#00BF00' }, + { stop: 80, color: '#00FF00' }, + { stop: 100, color: '#80FF80' } + ] + }); $("#popupHop").jqxWindow({ width: 800, height: 300, @@ -3365,7 +3422,7 @@ rowdata.h_amount = amount; calcIBUs(); }); - $("#wh_ibu").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 1, readOnly: true }); + $("#wh_ibu").jqxNumberInput( Show1dec ); $("#wh_time").jqxNumberInput( PosInt ); $("#wh_time").on('change', function (event) { console.log("time changed: "+event.args.value); @@ -3529,7 +3586,7 @@ // Tab 6, Yeasts $("#est_fg2").jqxTooltip({ content: 'Het eind SG. Dit wordt automatisch berekend.' }); - $("#est_fg2").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 3, readOnly: true }); + $("#est_fg2").jqxNumberInput( Show3dec ); $("#est_abv2").jqxTooltip({ content: 'Alcohol volume %. Dit wordt automatisch berekend.' }); $("#est_abv2").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true }); $("#popupYeast").jqxWindow({ @@ -3767,8 +3824,8 @@ }); // Tab 8, Water - $("#tgt_bu").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 2, readOnly: true }); - $("#tgt_cl_so4").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); + $("#tgt_bu").jqxNumberInput( Show2wat ); + $("#tgt_cl_so4").jqxNumberInput( Show1wat ); // Water source 1 $("#w1_name").jqxDropDownList({ @@ -3805,14 +3862,14 @@ calcWater(); } }); - $("#w1_amount").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#w1_calcium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#w1_magnesium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#w1_sodium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#w1_total_alkalinity").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#w1_chloride").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#w1_sulfate").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#w1_ph").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); + $("#w1_amount").jqxNumberInput( Show1wat ); + $("#w1_calcium").jqxNumberInput( Show1wat ); + $("#w1_magnesium").jqxNumberInput( Show1wat ); + $("#w1_sodium").jqxNumberInput( Show1wat ); + $("#w1_total_alkalinity").jqxNumberInput( Show1wat ); + $("#w1_chloride").jqxNumberInput( Show1wat ); + $("#w1_sulfate").jqxNumberInput( Show1wat ); + $("#w1_ph").jqxNumberInput( Show1wat ); // Water source 2 $("#w2_name").jqxDropDownList({ placeHolder: "Kies meng water:", @@ -3851,37 +3908,37 @@ }); $("#w2_amount").jqxTooltip({ content: 'De verdeling van het hoofd en meng water. Het totale maisch water volume blijft gelijk.'}); $("#w2_amount").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 94, height: 23, min: 0, max: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5, readOnly: true }); - $("#w2_calcium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#w2_magnesium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#w2_sodium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#w2_total_alkalinity").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#w2_chloride").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#w2_sulfate").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#w2_ph").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); + $("#w2_calcium").jqxNumberInput( Show1wat ); + $("#w2_magnesium").jqxNumberInput( Show1wat ); + $("#w2_sodium").jqxNumberInput( Show1wat ); + $("#w2_total_alkalinity").jqxNumberInput( Show1wat ); + $("#w2_chloride").jqxNumberInput( Show1wat ); + $("#w2_sulfate").jqxNumberInput( Show1wat ); + $("#w2_ph").jqxNumberInput( Show1wat ); // Water mixed - $("#wg_amount").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#wg_calcium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#wg_magnesium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#wg_sodium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#wg_total_alkalinity").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#wg_chloride").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#wg_sulfate").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#wg_ph").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); + $("#wg_amount").jqxNumberInput( Show1wat ); + $("#wg_calcium").jqxNumberInput( Show1wat ); + $("#wg_magnesium").jqxNumberInput( Show1wat ); + $("#wg_sodium").jqxNumberInput( Show1wat ); + $("#wg_total_alkalinity").jqxNumberInput( Show1wat ); + $("#wg_chloride").jqxNumberInput( Show1wat ); + $("#wg_sulfate").jqxNumberInput( Show1wat ); + $("#wg_ph").jqxNumberInput( Show1wat ); // Water treated $("#wb_calcium").jqxTooltip({ content: 'De ideale hoeveelheid Calcium is tussen 40 en 150.'}); - $("#wb_calcium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); + $("#wb_calcium").jqxNumberInput( Show1wat ); $("#wb_magnesium").jqxTooltip({ content: 'De ideale hoeveelheid Magnesium is lager dan 30.'}); - $("#wb_magnesium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); + $("#wb_magnesium").jqxNumberInput( Show1wat ); $("#wb_sodium").jqxTooltip({ content: 'De ideale hoeveelheid Natrium is lager dan 150.'}); - $("#wb_sodium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); + $("#wb_sodium").jqxNumberInput( Show1wat ); - $("#wb_total_alkalinity").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); + $("#wb_total_alkalinity").jqxNumberInput( Show1wat ); $("#wb_chloride").jqxTooltip({ content: 'De ideale hoeveelheid Chloride is lager dan 100.'}); - $("#wb_chloride").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); + $("#wb_chloride").jqxNumberInput( Show1wat ); $("#wb_sulfate").jqxTooltip({ content: 'De ideale hoeveelheid Sulfaat is lager dan 350.'}); - $("#wb_sulfate").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); + $("#wb_sulfate").jqxNumberInput( Show1wat ); - $("#wb_ph").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); + $("#wb_ph").jqxNumberInput( Show1wat ); // Water target profile $("#pr_name").jqxDropDownList({ placeHolder: "Kies doel profiel:", @@ -3905,12 +3962,12 @@ $("#pr_total_alkalinity").val(datarecord.total_alkalinity); } }); - $("#pr_calcium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#pr_magnesium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#pr_sodium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#pr_total_alkalinity").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#pr_chloride").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); - $("#pr_sulfate").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); + $("#pr_calcium").jqxNumberInput( Show1wat ); + $("#pr_magnesium").jqxNumberInput( Show1wat ); + $("#pr_sodium").jqxNumberInput( Show1wat ); + $("#pr_total_alkalinity").jqxNumberInput( Show1wat ); + $("#pr_chloride").jqxNumberInput( Show1wat ); + $("#pr_sulfate").jqxNumberInput( Show1wat ); // Water agents $("#wa_cacl2").jqxTooltip({ content: 'Voor het maken van een ander waterprofiel. Voegt calcium en chloride toe. Voor het verbeteren van zoetere bieren.' }); @@ -3985,7 +4042,7 @@ $("#brew_mash_ph").jqxTooltip({ content: 'De gemeten pH tijdens het maischen eventueel na correctie.' }); $("#brew_mash_ph").jqxNumberInput( SpinpH ); $("#est_mash_ph").jqxTooltip({ content: 'De gewenste pH tijdens het maischen.' }); - $("#est_mash_ph").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); + $("#est_mash_ph").jqxNumberInput( Show1wat ); $("#brew_preboil_ph").jqxTooltip({ content: 'De gemeten pH in de kookketel na het spoelen en voor de kook.' }); $("#brew_preboil_ph").jqxNumberInput( SpinpH ); // est_preboil_ph @@ -3996,12 +4053,15 @@ $("#brew_mash_sg").jqxNumberInput( SGopts ); $("#brew_mash_sg").on('valueChanged', function () { calcMashEfficiency(); }); $("#est_mash_sg").jqxTooltip({ content: 'Het berekende verwachte SG na het maischen.' }); - $("#est_mash_sg").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 3 }); + $("#est_mash_sg").jqxNumberInput( Show3wat ); $("#brew_preboil_sg").jqxTooltip({ content: 'Het gemeten SG in de kookketel na het spoelen en voor het koken.' }); $("#brew_preboil_sg").jqxNumberInput( SGopts ); - $("#brew_preboil_sg").on('valueChanged', function (event) { dataRecord.brew_preboil_sg = event.args.value; calcEfficiencyBeforeBoil() }); + $("#brew_preboil_sg").on('valueChanged', function (event) { + dataRecord.brew_preboil_sg = event.args.value; + calcEfficiencyBeforeBoil(); + }); $("#est_pre_sg").jqxTooltip({ content: 'Het berekende SG in de kookketel na het spoelen en voor het koken.' }); - $("#est_pre_sg").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 3 }); + $("#est_pre_sg").jqxNumberInput( Show3wat ); $("#brew_aboil_sg").jqxTooltip({ content: 'Het gemeten SG in de kookketel na het koken.' }); $("#brew_aboil_sg").jqxNumberInput( SGopts ); $("#brew_aboil_sg").on('valueChanged', function (event) { @@ -4011,14 +4071,17 @@ calcIBUs(); }); $("#est_og3").jqxTooltip({ content: 'Het gewenste SG in de kookketel na het koken.' }); - $("#est_og3").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 70, height: 23, decimalDigits: 3, readOnly: true }); + $("#est_og3").jqxNumberInput( Show3wat ); $("#brew_mash_efficiency").jqxTooltip({ content: 'Het behaalde maisch rendement.' }); - $("#brew_mash_efficiency").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 1 }); + $("#brew_mash_efficiency").jqxNumberInput( Show1dec ); $("#brew_preboil_volume").jqxTooltip({ content: 'Het gemeten volume van het wort voor het koken.' }); $("#brew_preboil_volume").jqxNumberInput( Spin1dec ); - $("#brew_preboil_volume").on('valueChanged', function (event) { dataRecord.brew_preboil_volume = event.args.value; calcEfficiencyBeforeBoil() }); + $("#brew_preboil_volume").on('valueChanged', function (event) { + dataRecord.brew_preboil_volume = event.args.value; + calcEfficiencyBeforeBoil(); + }); $("#est_pre_vol").jqxTooltip({ content: 'Het berekende volume van het wort voor het koken.' }); - $("#est_pre_vol").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); + $("#est_pre_vol").jqxNumberInput( Show1wat ); $("#brew_aboil_volume").jqxTooltip({ content: 'Het gemeten volume van het wort na het koken.' }); $("#brew_aboil_volume").jqxNumberInput( Spin1dec ); $("#brew_aboil_volume").on('valueChanged', function (event) { @@ -4028,11 +4091,11 @@ calcIBUs(); }); $("#est_a_vol").jqxTooltip({ content: 'Het gewenste volume na het koken.' }); - $("#est_a_vol").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); + $("#est_a_vol").jqxNumberInput( Show1wat ); $("#brew_preboil_efficiency").jqxTooltip({ content: 'Het berekende rendement voor het koken.' }); - $("#brew_preboil_efficiency").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 1 }); + $("#brew_preboil_efficiency").jqxNumberInput( Show1dec ); $("#brew_aboil_efficiency").jqxTooltip({ content: 'Het bereikte rendement na het koken.' }); - $("#brew_aboil_efficiency").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 1 }); + $("#brew_aboil_efficiency").jqxNumberInput( Show1dec ); $("#brew_sparge_temperature").jqxNumberInput( Spin1dec ); $("#brew_sparge_volume").jqxNumberInput( Spin1dec ); $("#brew_whirlpool9").jqxNumberInput( PosInt ); @@ -4069,12 +4132,12 @@ $("#brew_aeration_time").jqxNumberInput({ max: 1440 }); $("#brew_aeration_speed").jqxNumberInput( PosInt ); $("#brew_aeration_speed").jqxNumberInput({ max: 1440 }); - $("#brew_fermenter_volume").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 1 }); + $("#brew_fermenter_volume").jqxNumberInput( Show1dec ); $("#brew_fermenter_extrawater").jqxNumberInput( Spin1dec ); - $("#brew_fermenter_sg").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 3 }); + $("#brew_fermenter_sg").jqxNumberInput( Show3dec ); $("#brew_fermenter_tcloss").jqxNumberInput( Spin1dec ); - $("#brew_fermenter_ibu").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 0 }); - $("#brew_fermenter_color").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 0 }); + $("#brew_fermenter_ibu").jqxNumberInput( Show0dec ); + $("#brew_fermenter_color").jqxNumberInput( Show0dec ); $("#BLog").jqxButton({ template: "info", width: '150px', theme: theme }); $("#BLog").click(function () { // Open log in a new tab. @@ -4084,12 +4147,12 @@ // Tab 10, Fermentation // Note, fermentation temps changes must do calcCarbonation() - $("#brew_fermenter_sg2").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 3 }); + $("#brew_fermenter_sg2").jqxNumberInput( Show3dec ); $("#primary_start_temp").jqxNumberInput( YeastT ); $("#primary_max_temp").jqxNumberInput( YeastT ); $("#primary_end_temp").jqxNumberInput( YeastT ); $("#primary_end_sg").jqxNumberInput( SGopts ); - $("#primary_svg").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); + $("#primary_svg").jqxNumberInput( Show1dec ); $("#primary_end_date").jqxTooltip({ content: 'De eind datum van de hoofdvergisting en eventueel overhevelen.' }); $("#primary_end_date").jqxDateTimeInput( Dateopts ); $('#primary_end_date').on('close', function (event) { calcStage(); }); @@ -4098,9 +4161,9 @@ $("#secondary_end_date").jqxDateTimeInput( Dateopts ); $('#secondary_end_date').on('close', function (event) { calcStage(); }); $("#tertiary_temp").jqxNumberInput( YeastT ); - $("#fg").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 3, spinButtons: true, spinButtonsStep: 0.001 }); - $("#final_abv").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); - $("#final_svg").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); + $("#fg").jqxNumberInput( Spin3dec ); + $("#final_abv").jqxNumberInput( Show1dec ); + $("#final_svg").jqxNumberInput( Show1dec ); $("#FLog").jqxButton({ template: "info", width: '150px', theme: theme }); $("#FLog").click(function () { // Open log in a new tab. @@ -4145,14 +4208,14 @@ height: 23, autoDropDownHeight: true }); - $("#bottle_priming_amount").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 1, readOnly: true }); - $("#keg_priming_amount").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 1, readOnly: true }); - $("#bottle_priming_total").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 1, readOnly: true }); - $("#keg_priming_total").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 1, readOnly: true }); + $("#bottle_priming_amount").jqxNumberInput( Show1dec ); + $("#keg_priming_amount").jqxNumberInput( Show1dec ); + $("#bottle_priming_total").jqxNumberInput( Show1dec ); + $("#keg_priming_total").jqxNumberInput( Show1dec ); $("#keg_forced_carb").jqxCheckBox({ theme: theme, width: 120, height: 23 }); - $("#keg_pressure").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 1, readOnly: true }); - $("#bottle_abv").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 1, readOnly: true }); - $("#keg_abv").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 1, readOnly: true }); + $("#keg_pressure").jqxNumberInput( Show1dec ); + $("#bottle_abv").jqxNumberInput( Show1dec ); + $("#keg_abv").jqxNumberInput( Show1dec ); $("#bottle_carbonation_temp").jqxNumberInput( YeastT ); $("#keg_carbonation_temp").jqxNumberInput( YeastT ); diff -r 28953f9fc5b4 -r 4767a790d1f6 www/prod_edit.php --- a/www/prod_edit.php Sat Feb 09 16:49:04 2019 +0100 +++ b/www/prod_edit.php Sat Feb 09 20:14:21 2019 +0100 @@ -509,30 +509,30 @@ - Beluchten tijd: + Beluchten tijd min:
Naar gistvat Beluchten snelheid:
- Trub Chiller loss: + Koeler en trub verlies l:
SG in gistvat:
- Extra water: + Extra water in gistvat l:
- Kleur in gistvat: + Kleur in gistvat EBC:
- Volume naar gistvat: + Volume naar gistvat l:
- IBU in gistvat: + Bitterheid in gistvat IBU: