www/js/prod_edit.js

changeset 160
fea87a8d320b
parent 159
6428dae0605d
child 161
2218edd86ba1
equal deleted inserted replaced
159:6428dae0605d 160:fea87a8d320b
116 } 116 }
117 to_100 = my_100; 117 to_100 = my_100;
118 var est_og = estimate_sg(sugarsf, parseFloat(dataRecord.batch_size)); 118 var est_og = estimate_sg(sugarsf, parseFloat(dataRecord.batch_size));
119 $('#est_og').val(est_og); 119 $('#est_og').val(est_og);
120 $('#est_og2').val(est_og); 120 $('#est_og2').val(est_og);
121 $('#est_og3').val(est_og);
121 preboil_sg = estimate_sg(sugarsm, parseFloat(dataRecord.boil_size)); 122 preboil_sg = estimate_sg(sugarsm, parseFloat(dataRecord.boil_size));
122 var color = kw_to_ebc(dataRecord.color_method, colorw); 123 var color = kw_to_ebc(dataRecord.color_method, colorw);
123 $('#est_color').val(color); 124 $('#est_color').val(color);
124 $('#est_color2').val(color); 125 $('#est_color2').val(color);
125 var scolor = ebc_to_color(color); 126 var scolor = ebc_to_color(color);
574 $('#wg_sulfate').val(Math.round(sulfate * 10) / 10); 575 $('#wg_sulfate').val(Math.round(sulfate * 10) / 10);
575 // Note: brouwhulp has the malts included here in the result. 576 // Note: brouwhulp has the malts included here in the result.
576 var wg_ph = ph; 577 var wg_ph = ph;
577 $('#wg_ph').val(Math.round(ph * 10) / 10); 578 $('#wg_ph').val(Math.round(ph * 10) / 10);
578 $('#wb_ph').val(Math.round(MashpH() * 10) / 10); 579 $('#wb_ph').val(Math.round(MashpH() * 10) / 10);
580 $('#est_mash_ph').val(Math.round(MashpH() * 10) / 10);
579 bicarbonate = total_alkalinity * 1.22; 581 bicarbonate = total_alkalinity * 1.22;
580 var wg_bicarbonate = bicarbonate; 582 var wg_bicarbonate = bicarbonate;
581 583
582 // Noot: de volgende berekeningen geven bijna gelijke resultaten in Brun'water. 584 // Noot: de volgende berekeningen geven bijna gelijke resultaten in Brun'water.
583 // Calculate Ca 585 // Calculate Ca
731 break; 733 break;
732 } 734 }
733 } 735 }
734 ph = TpH; 736 ph = TpH;
735 $('#wb_ph').val(Math.round(ph * 10) / 10); 737 $('#wb_ph').val(Math.round(ph * 10) / 10);
738 $('#est_mash_ph').val(Math.round(ph * 10) / 10);
736 } else { // Manual 739 } else { // Manual
737 console.log("calc_acid no"); 740 console.log("calc_acid no");
738 // First add base salts 741 // First add base salts
739 if (parseFloat($("#wa_base").jqxNumberInput('decimal')) > 0) { 742 if (parseFloat($("#wa_base").jqxNumberInput('decimal')) > 0) {
740 if (liters > 0) { 743 if (liters > 0) {
814 RA = wg_bicarbonate - protonDeficit * frac / liters; 817 RA = wg_bicarbonate - protonDeficit * frac / liters;
815 bicarbonate = RA; 818 bicarbonate = RA;
816 total_alkalinity = RA * 50 / 61; 819 total_alkalinity = RA * 50 / 61;
817 ph = pHa; 820 ph = pHa;
818 $('#wb_ph').val(Math.round(ph * 10) / 10); 821 $('#wb_ph').val(Math.round(ph * 10) / 10);
822 $('#est_mash_ph').val(Math.round(ph * 10) / 10);
819 } 823 }
820 } 824 }
821 825
822 if ((AT == 'Zwavelzuur') && (liters > 0)) { 826 if ((AT == 'Zwavelzuur') && (liters > 0)) {
823 RA = parseFloat($("#wa_caso4").jqxNumberInput('decimal')) * MMSO4 / MMCaSO4 + 827 RA = parseFloat($("#wa_caso4").jqxNumberInput('decimal')) * MMSO4 / MMCaSO4 +
1097 calcABV(); 1101 calcABV();
1098 calcIBUs(); 1102 calcIBUs();
1099 }); 1103 });
1100 $('#est_og').on('change', function (event) { 1104 $('#est_og').on('change', function (event) {
1101 console.log("est_og change:"+event.args.value); 1105 console.log("est_og change:"+event.args.value);
1106 $('#est_og2').val(event.args.value);
1107 $('#est_og3').val(event.args.value);
1102 calcFermentablesFromOG(event.args.value); // Adjust fermentables amounts 1108 calcFermentablesFromOG(event.args.value); // Adjust fermentables amounts
1103 calcFermentables(); // Update the recipe details 1109 calcFermentables(); // Update the recipe details
1104 calcSVG(); 1110 calcSVG();
1105 calcABV(); // and ABV 1111 calcABV(); // and ABV
1106 calcIBUs(); // and the IBU's. 1112 calcIBUs(); // and the IBU's.
1294 $("#batch_size").jqxTooltip({ content: 'Het volume van het gekoelde wort na het koken.' }); 1300 $("#batch_size").jqxTooltip({ content: 'Het volume van het gekoelde wort na het koken.' });
1295 $("#boil_time").jqxTooltip({ content: 'De kooktijd in minuten.' }); 1301 $("#boil_time").jqxTooltip({ content: 'De kooktijd in minuten.' });
1296 $("#boil_size").jqxTooltip({ content: 'Het volume van het wort voor het koken.' }); 1302 $("#boil_size").jqxTooltip({ content: 'Het volume van het wort voor het koken.' });
1297 $("#efficiency").jqxTooltip({ content: 'Het rendement van maischen en koken.' }); 1303 $("#efficiency").jqxTooltip({ content: 'Het rendement van maischen en koken.' });
1298 $("#est_og").jqxTooltip({ content: 'Het begin SG wat je wilt bereiken. De moutstort wordt automatisch herberekend.' }); 1304 $("#est_og").jqxTooltip({ content: 'Het begin SG wat je wilt bereiken. De moutstort wordt automatisch herberekend.' });
1299 $("#est_og2").jqxTooltip({ content: 'Het begin SG wat je wilt bereiken. De moutstort wordt automatisch herberekend.' }); 1305 $("#est_og2").jqxTooltip({ content: 'Het geschatte begin SG van dit product.' });
1306 $("#est_og3").jqxTooltip({ content: 'Het geschatte begin SG van dit product.' });
1300 $("#est_fg").jqxTooltip({ content: 'Het eind SG. Dit wordt automatisch berekend.' }); 1307 $("#est_fg").jqxTooltip({ content: 'Het eind SG. Dit wordt automatisch berekend.' });
1301 $("#est_color").jqxTooltip({ content: 'De kleur in EBC. Dit wordt automatisch berekend.' }); 1308 $("#est_color").jqxTooltip({ content: 'De kleur in EBC. Dit wordt automatisch berekend.' });
1302 $("#est_color2").jqxTooltip({ content: 'De kleur in EBC. Dit wordt automatisch berekend.' }); 1309 $("#est_color2").jqxTooltip({ content: 'De kleur in EBC. Dit wordt automatisch berekend.' });
1303 $("#est_ibu").jqxTooltip({ content: 'De bitterheid in IBU. Dit wordt automatisch berekend.' }); 1310 $("#est_ibu").jqxTooltip({ content: 'De bitterheid in IBU. Dit wordt automatisch berekend.' });
1304 $("#est_ibu2").jqxTooltip({ content: 'De bitterheid in IBU. Dit wordt automatisch berekend.' }); 1311 $("#est_ibu2").jqxTooltip({ content: 'De bitterheid in IBU. Dit wordt automatisch berekend.' });
1605 $("#boil_size").val(dataRecord.boil_size); 1612 $("#boil_size").val(dataRecord.boil_size);
1606 $("#boil_time").val(dataRecord.boil_time); 1613 $("#boil_time").val(dataRecord.boil_time);
1607 $("#efficiency").val(dataRecord.efficiency); 1614 $("#efficiency").val(dataRecord.efficiency);
1608 $("#est_og").val(dataRecord.est_og); 1615 $("#est_og").val(dataRecord.est_og);
1609 $("#est_og2").val(dataRecord.est_og); 1616 $("#est_og2").val(dataRecord.est_og);
1617 $("#est_og3").val(dataRecord.est_og);
1610 $("#est_fg").val(dataRecord.est_fg); 1618 $("#est_fg").val(dataRecord.est_fg);
1611 $("#est_color").val(dataRecord.est_color); 1619 $("#est_color").val(dataRecord.est_color);
1612 $("#est_color2").val(dataRecord.est_color); 1620 $("#est_color2").val(dataRecord.est_color);
1613 $("#est_abv").val(dataRecord.est_abv); 1621 $("#est_abv").val(dataRecord.est_abv);
1614 $("#color_method").val(dataRecord.color_method); 1622 $("#color_method").val(dataRecord.color_method);
2779 var srcSource = [ "Bron 1", "Bron 2", "Gemengd" ]; 2787 var srcSource = [ "Bron 1", "Bron 2", "Gemengd" ];
2780 var srcMaterial= [ "RVS", "Aluminium", "Kunststof", "Koper" ]; 2788 var srcMaterial= [ "RVS", "Aluminium", "Kunststof", "Koper" ];
2781 var srcAeration= [ 'None', 'Air', 'Oxygen' ]; 2789 var srcAeration= [ 'None', 'Air', 'Oxygen' ];
2782 var srcCooling= [ '-', 'Emersion chiller', 'Counterflow chiller', 'Au bain marie', 'Natural' ]; 2790 var srcCooling= [ '-', 'Emersion chiller', 'Counterflow chiller', 'Au bain marie', 'Natural' ];
2783 // '-', 'Dompelkoeler', 'Tegenstroomkoeler', 'Au bain marie', 'Laten afkoelen' 2791 // '-', 'Dompelkoeler', 'Tegenstroomkoeler', 'Au bain marie', 'Laten afkoelen'
2792 // Tab 1, Algemeen
2784 $("#name").jqxInput({ theme: theme, width: 640, height: 23 }); 2793 $("#name").jqxInput({ theme: theme, width: 640, height: 23 });
2785 $("#code").jqxInput({ theme: theme, width: 100, height: 23 }); 2794 $("#code").jqxInput({ theme: theme, width: 100, height: 23 });
2786 $("#birth").jqxDateTimeInput({ theme: theme, width: 150, height: 23, formatString: 'yyyy-MM-dd' }); 2795 $("#birth").jqxDateTimeInput({ theme: theme, width: 150, height: 23, formatString: 'yyyy-MM-dd' });
2787 $("#stage").jqxInput({ theme: theme, width: 100, height: 23 }); 2796 $("#stage").jqxInput({ theme: theme, width: 100, height: 23 });
2788 $("#notes").jqxInput({ theme: theme, width: 960, height: 100 });
2789 $("#log_brew").jqxCheckBox({ theme: theme, width: 120, height: 23, disabled : true }); 2797 $("#log_brew").jqxCheckBox({ theme: theme, width: 120, height: 23, disabled : true });
2790 $("#log_fermentation").jqxCheckBox({ theme: theme, width: 120, height: 23, disabled : true }); 2798 $("#log_fermentation").jqxCheckBox({ theme: theme, width: 120, height: 23, disabled : true });
2791 $("#inventory_reduced").jqxCheckBox({ theme: theme, width: 120, height: 23 }); 2799 $("#inventory_reduced").jqxCheckBox({ theme: theme, width: 120, height: 23 });
2792 $('#inventory_reduced').on('checked', function (event) { 2800 $('#inventory_reduced').on('checked', function (event) {
2793 // Call a script to do the work and block this. 2801 // Call a script to do the work and block this.
2806 if (brewstage >= 10) { 2814 if (brewstage >= 10) {
2807 $("#stage").val('Ready'); 2815 $("#stage").val('Ready');
2808 brewstage = 10; 2816 brewstage = 10;
2809 } 2817 }
2810 }); 2818 });
2819 $("#notes").jqxInput({ theme: theme, width: 960, height: 100 });
2820 $("#type").jqxDropDownList({ theme: theme, source: srcType, width: 125, height: 23, dropDownHeight: 95 });
2821 $("#efficiency").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 40, max: 100, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right' });
2822
2823 $("#batch_size").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 4, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1, symbol: 'L', symbolPosition: 'right' });
2824 $("#boil_time").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 4, max: 360, decimalDigits: 0, spinButtons: true });
2825 $("#boil_size").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 100, height: 23, decimalDigits: 2, readOnly: true, symbol: 'L', symbolPosition: 'right' });
2826 $("#st_guide").jqxInput({ theme: theme, width: 250, height: 23 });
2827 $("#st_name").jqxInput({ theme: theme, width: 250, height: 23 });
2828 $("#st_letter").jqxInput({ theme: theme, width: 100, height: 23 });
2829 $("#st_type").jqxInput({ theme: theme, width: 90, height: 23 });
2830 $("#st_category").jqxInput({ theme: theme, width: 250, height: 23 });
2831 $("#st_category_number").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
2832
2833 $("#est_og").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 1.000, max: 1.200, decimalDigits: 3, spinButtons: true, spinButtonsStep: 0.001 });
2834 $("#st_og_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true });
2835 $("#st_og_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true });
2836 $("#est_fg").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 100, height: 23, decimalDigits: 3, readOnly: true });
2837 $("#st_fg_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true });
2838 $("#st_fg_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true });
2839 $("#est_abv").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true });
2840 $("#st_abv_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true });
2841 $("#st_abv_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true });
2842 $("#est_color").jqxNumberInput({ inputMode: 'simple', theme: theme, symbol: ' EBC', symbolPosition: 'right', width: 100, height: 23, decimalDigits: 0, readOnly: true });
2843 $("#st_color_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
2844 $("#st_color_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
2845 $("#color_method").jqxDropDownList({ theme: theme, source: srcColor, width: 125, height: 23, dropDownHeight: 95 });
2846 $("#est_ibu").jqxNumberInput({ inputMode: 'simple', theme: theme, symbol: ' IBU', symbolPosition: 'right', width: 100, height: 23, decimalDigits: 0, readOnly: true });
2847 $("#st_ibu_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
2848 $("#st_ibu_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
2849 $("#ibu_method").jqxDropDownList({ theme: theme, source: srcIBU, width: 125, height: 23, dropDownHeight: 95, dropDownVerticalAlignment: 'top' });
2850 $("#est_carb").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true });
2851 $("#st_carb_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true });
2852 $("#st_carb_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true });
2853
2854 // Tab 2, Equipment
2811 $("#eq_name").jqxInput({ theme: theme, width: 250, height: 23 }); 2855 $("#eq_name").jqxInput({ theme: theme, width: 250, height: 23 });
2812 $("#eq_boil_size").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); 2856 $("#eq_boil_size").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
2813 $("#eq_batch_size").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); 2857 $("#eq_batch_size").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
2814 $("#eq_tun_volume").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); 2858 $("#eq_tun_volume").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
2815 $("#eq_top_up_water").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); 2859 $("#eq_top_up_water").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
2823 $("#eq_lauter_deadspace").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); 2867 $("#eq_lauter_deadspace").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
2824 $("#eq_kettle_volume").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); 2868 $("#eq_kettle_volume").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
2825 $("#eq_mash_volume").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); 2869 $("#eq_mash_volume").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
2826 $("#eq_mash_max").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); 2870 $("#eq_mash_max").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
2827 $("#eq_efficiency").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); 2871 $("#eq_efficiency").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
2828 // Brewday 2872
2873 // Tab 3, Fermentables
2874 $("#est_color2").jqxNumberInput({ inputMode: 'simple', theme: theme, symbol: ' EBC', symbolPosition: 'right', width: 100, height: 23, decimalDigits: 0, readOnly: true });
2875 $("#perc_malts").jqxProgressBar({ width: 300, height: 23, theme: theme, showText: true });
2876 $("#est_og2").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 100, height: 23, decimalDigits: 3, readOnly: true });
2877 $("#perc_sugars").jqxProgressBar({ width: 300, height: 23, theme: theme, showText: true });
2878 $("#perc_cara").jqxProgressBar({ width: 300, height: 23, theme: theme, showText: true });
2879
2880 // Tab 4, Hops
2881 $("#est_ibu2").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
2882 $("#hop_flavour").jqxProgressBar({ width: 300, height: 23, theme: theme, showText: true });
2883 $("#hop_aroma").jqxProgressBar({ width: 300, height: 23, theme: theme, showText: true });
2884
2885 // Tab 5, Miscs
2886
2887 // Tab 6, Yeasts
2888
2889 // Tab 7, Mashing
2890 $("#mash_name").jqxInput({ theme: theme, width: 320, height: 23 });
2891
2892 // Tab 8, Water
2893 $("#tgt_bu").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 2, readOnly: true });
2894 $("#tgt_cl_so4").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2895 $("#w1_name").jqxDropDownList({
2896 placeHolder: "Kies hoofd water:",
2897 theme: theme,
2898 source: waterlist,
2899 displayMember: "name",
2900 width: 250,
2901 height: 27,
2902 dropDownWidth: 400,
2903 dropDownHeight: 400
2904 });
2905 $("#w1_name").on('select', function (event) {
2906 if (event.args) {
2907 var index = event.args.index;
2908 var datarecord = waterlist.records[index];
2909 dataRecord.w1_name = datarecord.name;
2910 $("#w1_calcium").val(datarecord.calcium);
2911 dataRecord.w1_calcium = datarecord.calcium;
2912 $("#w1_sulfate").val(datarecord.sulfate);
2913 dataRecord.w1_sulfate = datarecord.sulfate;
2914 $("#w1_chloride").val(datarecord.chloride);
2915 dataRecord.w1_chloride = datarecord.chloride;
2916 $("#w1_sodium").val(datarecord.sodium);
2917 dataRecord.w1_sodium = datarecord.sodium;
2918 $("#w1_magnesium").val(datarecord.magnesium);
2919 dataRecord.w1_magnesium = datarecord.magnesium;
2920 $("#w1_total_alkalinity").val(datarecord.total_alkalinity);
2921 dataRecord.w1_total_alkalinity = datarecord.total_alkalinity;
2922 $("#w1_ph").val(datarecord.ph);
2923 dataRecord.w1_ph = datarecord.ph;
2924 $("#w1_cost").val(datarecord.cost);
2925 dataRecord.w1_cost = datarecord.cost;
2926 calcWater();
2927 }
2928 });
2929 $("#w1_amount").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2930 $("#w1_calcium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2931 $("#w1_magnesium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2932 $("#w1_sodium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2933 $("#w1_total_alkalinity").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2934 $("#w1_chloride").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2935 $("#w1_sulfate").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2936 $("#w1_ph").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2937 $("#w2_name").jqxDropDownList({
2938 placeHolder: "Kies meng water:",
2939 theme: theme,
2940 source: waterlist,
2941 displayMember: "name",
2942 width: 250,
2943 height: 27,
2944 dropDownWidth: 400,
2945 dropDownHeight: 400
2946 });
2947 $("#w2_name").on('select', function (event) {
2948 if (event.args) {
2949 var index = event.args.index;
2950 var datarecord = waterlist.records[index];
2951 dataRecord.w2_name = datarecord.name;
2952 $("#w2_calcium").val(datarecord.calcium);
2953 dataRecord.w2_calcium = datarecord.calcium;
2954 $("#w2_sulfate").val(datarecord.sulfate);
2955 dataRecord.w2_sulfate = datarecord.sulfate;
2956 $("#w2_chloride").val(datarecord.chloride);
2957 dataRecord.w2_chloride = datarecord.chloride;
2958 $("#w2_sodium").val(datarecord.sodium);
2959 dataRecord.w2_sodium = datarecord.sodium;
2960 $("#w2_magnesium").val(datarecord.magnesium);
2961 dataRecord.w2_magnesium = datarecord.magnesium;
2962 $("#w2_total_alkalinity").val(datarecord.total_alkalinity);
2963 dataRecord.w2_total_alkalinity = datarecord.total_alkalinity;
2964 $("#w2_ph").val(datarecord.ph);
2965 dataRecord.w2_ph = datarecord.ph;
2966 $("#w2_cost").val(datarecord.cost);
2967 dataRecord.w2_cost = datarecord.cost;
2968 $("#w2_amount").jqxNumberInput({ max: 100000, readOnly: false }); // Set high max to enable the spinbuttons.
2969 calcWater();
2970 }
2971 });
2972 $("#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 });
2973 $("#w2_calcium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2974 $("#w2_magnesium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2975 $("#w2_sodium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2976 $("#w2_total_alkalinity").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2977 $("#w2_chloride").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2978 $("#w2_sulfate").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2979 $("#w2_ph").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2980
2981 $("#wg_amount").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2982 $("#wg_calcium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2983 $("#wg_magnesium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2984 $("#wg_sodium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2985 $("#wg_total_alkalinity").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2986 $("#wg_chloride").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2987 $("#wg_sulfate").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2988 $("#wg_ph").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2989
2990 $("#wb_calcium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2991 $("#wb_magnesium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2992 $("#wb_sodium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2993 $("#wb_total_alkalinity").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2994 $("#wb_chloride").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2995 $("#wb_sulfate").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2996 $("#wb_ph").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2997
2998 $("#pr_name").jqxDropDownList({
2999 placeHolder: "Kies doel profiel:",
3000 theme: theme,
3001 source: waterprofiles,
3002 displayMember: "name",
3003 width: 250,
3004 height: 27,
3005 dropDownWidth: 400,
3006 dropDownHeight: 300
3007 });
3008 $("#pr_name").on('select', function (event) {
3009 if (event.args) {
3010 var index = event.args.index;
3011 var datarecord = waterprofiles.records[index];
3012 $("#pr_calcium").val(datarecord.calcium);
3013 $("#pr_sulfate").val(datarecord.sulfate);
3014 $("#pr_chloride").val(datarecord.chloride);
3015 $("#pr_sodium").val(datarecord.sodium);
3016 $("#pr_magnesium").val(datarecord.magnesium);
3017 $("#pr_total_alkalinity").val(datarecord.total_alkalinity);
3018 }
3019 });
3020 $("#pr_calcium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3021 $("#pr_magnesium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3022 $("#pr_sodium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3023 $("#pr_total_alkalinity").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3024 $("#pr_chloride").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3025 $("#pr_sulfate").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3026
3027 $("#wa_cacl2").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 0, max: 1000, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1, symbol: ' gr', symbolPosition: 'right' });
3028 $("#mash_ph").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 4, max: 8, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
3029 $("#sparge_volume").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
3030 $("#wa_caso4").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 0, max: 1000, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1, symbol: ' gr', symbolPosition: 'right' });
3031 $("#calc_acid").jqxCheckBox({ theme: theme, width: 120, height: 23 });
3032 $("#sparge_temp").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 70, max: 98, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 });
3033 $("#wa_mgso4").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 0, max: 1000, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1, symbol: ' gr', symbolPosition: 'right' });
3034 $("#wa_base_name").jqxDropDownList({ theme: theme, source: srcBase, width: 100, height: 23, dropDownHeight: 128 });
3035 $("#wa_base").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 0, decimalDigits: 2, spinButtons: true, spinButtonsStep: 0.05, symbol: ' gr', symbolPosition: 'right' });
3036 $("#sparge_source").jqxDropDownList({ theme: theme, source: srcSource, width: 100, height: 23, dropDownHeight: 95 });
3037 $("#wa_nacl").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 0, max: 1000, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1, symbol: ' gr', symbolPosition: 'right' });
3038 $("#wa_acid_name").jqxDropDownList({ theme: theme, source: srcAcid, width: 100, height: 23, dropDownHeight: 128 })
3039 $("#wa_acid").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 0, decimalDigits: 2, spinButtons: true, spinButtonsStep: 0.05, symbol: ' ml', symbolPosition: 'right' });
3040 $("#wa_acid_perc").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 80, height: 23, min: 0, max: 100, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right' });
3041 $("#sparge_ph").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 4.5, max: 6.5, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
3042 $("#sparge_acid_type").jqxDropDownList({ theme: theme, source: srcAcid, width: 100, height: 23, dropDownHeight: 128 });
3043 $("#sparge_acid_perc").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, spinButtons: true, decimalDigits: 0, symbol: '%', symbolPosition: 'right' });
3044 $("#sparge_acid_amount").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 100, height: 23, decimalDigits: 2, readOnly: true, symbol: ' ml', symbolPosition: 'right' });
3045
3046 // Tab 9, Brewday
2829 $("#brew_date_start").jqxDateTimeInput({ theme: theme, width: 230, height: 23, formatString: 'yyyy-MM-dd HH:mm:ss', showTimeButton: true }); 3047 $("#brew_date_start").jqxDateTimeInput({ theme: theme, width: 230, height: 23, formatString: 'yyyy-MM-dd HH:mm:ss', showTimeButton: true });
3048 $("#brew_date_end").jqxDateTimeInput({ theme: theme, width: 230, height: 23, formatString: 'yyyy-MM-dd HH:mm:ss', showTimeButton: true });
2830 $("#brew_mash_ph").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 }); 3049 $("#brew_mash_ph").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
3050 $("#est_mash_ph").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
3051 $("#brew_preboil_ph").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
3052 // est_preboil_ph
3053 $("#brew_aboil_ph").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
3054 // est_aboil_ph
2831 $("#brew_mash_sg").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 1.000, max: 1.200, decimalDigits: 3, spinButtons: true, spinButtonsStep: 0.001 }); 3055 $("#brew_mash_sg").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 1.000, max: 1.200, decimalDigits: 3, spinButtons: true, spinButtonsStep: 0.001 });
2832 $("#brew_mash_sg").on('valueChanged', function () { calcMashEfficiency(); }); 3056 $("#brew_mash_sg").on('valueChanged', function () { calcMashEfficiency(); });
3057 $("#est_mash_sg").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 3 });
3058 $("#brew_preboil_sg").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 3, spinButtons: true, spinButtonsStep: 0.001 });
3059 $("#brew_aboil_sg").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 3, spinButtons: true, spinButtonsStep: 0.001 });
3060 $("#est_og3").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 70, height: 23, decimalDigits: 3, readOnly: true });
2833 $("#brew_mash_efficiency").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); 3061 $("#brew_mash_efficiency").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
3062 $("#brew_preboil_volume").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
3063 $("#brew_aboil_volume").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
3064 $("#brew_preboil_efficiency").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
3065 $("#brew_aboil_efficiency").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
2834 $("#brew_sparge_temperature").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 }); 3066 $("#brew_sparge_temperature").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
2835 $("#brew_sparge_volume").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 }); 3067 $("#brew_sparge_volume").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
3068 $("#brew_whirlpool9").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, max: 120, decimalDigits: 0, spinButtons: true });
3069 $("#brew_cooling_to").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
2836 $("#brew_sparge_ph").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, max: 14, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 }); 3070 $("#brew_sparge_ph").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, max: 14, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
2837 $("#brew_preboil_volume").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
2838 $("#brew_preboil_sg").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 3, spinButtons: true, spinButtonsStep: 0.001 });
2839 $("#brew_preboil_ph").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
2840 $("#brew_preboil_efficiency").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
2841 $("#brew_aboil_volume").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
2842 $("#brew_aboil_sg").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 3, spinButtons: true, spinButtonsStep: 0.001 });
2843 $("#brew_aboil_ph").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
2844 $("#brew_aboil_efficiency").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
2845 $("#brew_whirlpool9").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, max: 120, decimalDigits: 0, spinButtons: true });
2846 $("#brew_whirlpool7").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, max: 120, decimalDigits: 0, spinButtons: true }); 3071 $("#brew_whirlpool7").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, max: 120, decimalDigits: 0, spinButtons: true });
3072 $("#brew_cooling_method").jqxDropDownList({ theme: theme, source: srcCooling, width: 170, height: 23, dropDownHeight: 153 });
2847 $("#brew_whirlpool6").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, max: 120, decimalDigits: 0, spinButtons: true }); 3073 $("#brew_whirlpool6").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, max: 120, decimalDigits: 0, spinButtons: true });
3074 $("#brew_cooling_time").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, max: 1440, decimalDigits: 0, spinButtons: true });
2848 $("#brew_whirlpool2").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, max: 120, decimalDigits: 0, spinButtons: true }); 3075 $("#brew_whirlpool2").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, max: 120, decimalDigits: 0, spinButtons: true });
2849 $("#brew_cooling_method").jqxDropDownList({ theme: theme, source: srcCooling, width: 170, height: 23, dropDownHeight: 153 });
2850 $("#brew_cooling_to").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
2851 $("#brew_cooling_time").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, max: 1440, decimalDigits: 0, spinButtons: true });
2852 $("#brew_aeration_type").jqxDropDownList({ theme: theme, source: srcAeration, width: 100, height: 23, dropDownHeight: 95 }); 3076 $("#brew_aeration_type").jqxDropDownList({ theme: theme, source: srcAeration, width: 100, height: 23, dropDownHeight: 95 });
2853 $("#brew_aeration_time").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, max: 1440, decimalDigits: 0, spinButtons: true }); 3077 $("#brew_aeration_time").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, max: 1440, decimalDigits: 0, spinButtons: true });
2854 $("#brew_aeration_speed").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, max: 1440, decimalDigits: 0, spinButtons: true }); 3078 $("#brew_aeration_speed").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, max: 1440, decimalDigits: 0, spinButtons: true });
2855 $("#brew_fermenter_volume").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 }); 3079 $("#brew_fermenter_volume").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
2856 $("#brew_fermenter_extrawater").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 }); 3080 $("#brew_fermenter_extrawater").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
3081 $("#brew_fermenter_sg").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 3 });
2857 $("#brew_fermenter_extrasugar").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 }); 3082 $("#brew_fermenter_extrasugar").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
2858 $("#brew_fermenter_sg").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 3 });
2859 $("#brew_fermenter_ibu").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 0 }); 3083 $("#brew_fermenter_ibu").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 0 });
2860 $("#brew_fermenter_color").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 0 }); 3084 $("#brew_fermenter_color").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 0 });
2861 $("#brew_date_end").jqxDateTimeInput({ theme: theme, width: 230, height: 23, formatString: 'yyyy-MM-dd HH:mm:ss', showTimeButton: true }); 3085
2862 // Vergisting 3086 // Tab 10, Fermentation
2863 // Packaging 3087
2864 // Tasting 3088 // Tab 11, Packaging
2865 3089
2866 $("#st_name").jqxInput({ theme: theme, width: 250, height: 23 }); 3090 // Tab 12, Tasting
2867 $("#st_letter").jqxInput({ theme: theme, width: 100, height: 23 });
2868 $("#st_guide").jqxInput({ theme: theme, width: 250, height: 23 });
2869 $("#st_category").jqxInput({ theme: theme, width: 250, height: 23 });
2870 $("#st_category_number").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
2871 $("#st_type").jqxInput({ theme: theme, width: 90, height: 23 });
2872 $("#type").jqxDropDownList({ theme: theme, source: srcType, width: 125, height: 23, dropDownHeight: 95 });
2873 $("#batch_size").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 4, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1, symbol: 'L', symbolPosition: 'right' });
2874 $("#boil_size").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 100, height: 23, decimalDigits: 2, readOnly: true, symbol: 'L', symbolPosition: 'right' });
2875 $("#boil_time").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 4, max: 360, decimalDigits: 0, spinButtons: true });
2876 $("#efficiency").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 40, max: 100, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right' });
2877 $("#est_og").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 1.000, max: 1.200, decimalDigits: 3, spinButtons: true, spinButtonsStep: 0.001 });
2878 $("#est_og2").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 100, height: 23, decimalDigits: 3, readOnly: true });
2879 $("#st_og_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true });
2880 $("#st_og_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true });
2881
2882 $("#est_fg").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 100, height: 23, decimalDigits: 3, readOnly: true });
2883 $("#st_fg_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true });
2884 $("#st_fg_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true });
2885
2886 $("#est_abv").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true });
2887 $("#st_abv_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true });
2888 $("#st_abv_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true });
2889
2890 $("#est_color").jqxNumberInput({ inputMode: 'simple', theme: theme, symbol: ' EBC', symbolPosition: 'right', width: 100, height: 23, decimalDigits: 0, readOnly: true });
2891 $("#est_color2").jqxNumberInput({ inputMode: 'simple', theme: theme, symbol: ' EBC', symbolPosition: 'right', width: 100, height: 23, decimalDigits: 0, readOnly: true });
2892 $("#st_color_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
2893 $("#st_color_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
2894 $("#color_method").jqxDropDownList({ theme: theme, source: srcColor, width: 125, height: 23, dropDownHeight: 95 });
2895
2896 $("#est_ibu").jqxNumberInput({ inputMode: 'simple', theme: theme, symbol: ' IBU', symbolPosition: 'right', width: 100, height: 23, decimalDigits: 0, readOnly: true });
2897 $("#est_ibu2").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
2898 $("#st_ibu_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
2899 $("#st_ibu_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
2900 $("#ibu_method").jqxDropDownList({ theme: theme, source: srcIBU, width: 125, height: 23, dropDownHeight: 95, dropDownVerticalAlignment: 'top' });
2901
2902 $("#est_carb").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true });
2903 $("#st_carb_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true });
2904 $("#st_carb_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true });
2905
2906 $("#mash_name").jqxInput({ theme: theme, width: 320, height: 23 });
2907 $("#mash_ph").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 4, max: 8, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
2908
2909 $("#est_mash_sg").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 3 });
2910
2911 // Several gauges
2912 $("#hop_flavour").jqxProgressBar({ width: 300, height: 23, theme: theme, showText: true });
2913 $("#hop_aroma").jqxProgressBar({ width: 300, height: 23, theme: theme, showText: true });
2914 $("#perc_malts").jqxProgressBar({ width: 300, height: 23, theme: theme, showText: true });
2915 $("#perc_sugars").jqxProgressBar({ width: 300, height: 23, theme: theme, showText: true });
2916 $("#perc_cara").jqxProgressBar({ width: 300, height: 23, theme: theme, showText: true });
2917
2918 // Water treatment
2919 $("#w1_name").jqxDropDownList({
2920 placeHolder: "Kies hoofd water:",
2921 theme: theme,
2922 source: waterlist,
2923 displayMember: "name",
2924 width: 250,
2925 height: 27,
2926 dropDownWidth: 400,
2927 dropDownHeight: 400
2928 });
2929 $("#w1_name").on('select', function (event) {
2930 if (event.args) {
2931 var index = event.args.index;
2932 var datarecord = waterlist.records[index];
2933 dataRecord.w1_name = datarecord.name;
2934 $("#w1_calcium").val(datarecord.calcium);
2935 dataRecord.w1_calcium = datarecord.calcium;
2936 $("#w1_sulfate").val(datarecord.sulfate);
2937 dataRecord.w1_sulfate = datarecord.sulfate;
2938 $("#w1_chloride").val(datarecord.chloride);
2939 dataRecord.w1_chloride = datarecord.chloride;
2940 $("#w1_sodium").val(datarecord.sodium);
2941 dataRecord.w1_sodium = datarecord.sodium;
2942 $("#w1_magnesium").val(datarecord.magnesium);
2943 dataRecord.w1_magnesium = datarecord.magnesium;
2944 $("#w1_total_alkalinity").val(datarecord.total_alkalinity);
2945 dataRecord.w1_total_alkalinity = datarecord.total_alkalinity;
2946 $("#w1_ph").val(datarecord.ph);
2947 dataRecord.w1_ph = datarecord.ph;
2948 $("#w1_cost").val(datarecord.cost);
2949 dataRecord.w1_cost = datarecord.cost;
2950 calcWater();
2951 }
2952 });
2953 $("#w1_amount").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2954 $("#w1_calcium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2955 $("#w1_magnesium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2956 $("#w1_sodium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2957 $("#w1_total_alkalinity").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2958 $("#w1_chloride").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2959 $("#w1_sulfate").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2960 $("#w1_ph").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2961
2962 $("#w2_name").jqxDropDownList({
2963 placeHolder: "Kies meng water:",
2964 theme: theme,
2965 source: waterlist,
2966 displayMember: "name",
2967 width: 250,
2968 height: 27,
2969 dropDownWidth: 400,
2970 dropDownHeight: 400
2971 });
2972 $("#w2_name").on('select', function (event) {
2973 if (event.args) {
2974 var index = event.args.index;
2975 var datarecord = waterlist.records[index];
2976 dataRecord.w2_name = datarecord.name;
2977 $("#w2_calcium").val(datarecord.calcium);
2978 dataRecord.w2_calcium = datarecord.calcium;
2979 $("#w2_sulfate").val(datarecord.sulfate);
2980 dataRecord.w2_sulfate = datarecord.sulfate;
2981 $("#w2_chloride").val(datarecord.chloride);
2982 dataRecord.w2_chloride = datarecord.chloride;
2983 $("#w2_sodium").val(datarecord.sodium);
2984 dataRecord.w2_sodium = datarecord.sodium;
2985 $("#w2_magnesium").val(datarecord.magnesium);
2986 dataRecord.w2_magnesium = datarecord.magnesium;
2987 $("#w2_total_alkalinity").val(datarecord.total_alkalinity);
2988 dataRecord.w2_total_alkalinity = datarecord.total_alkalinity;
2989 $("#w2_ph").val(datarecord.ph);
2990 dataRecord.w2_ph = datarecord.ph;
2991 $("#w2_cost").val(datarecord.cost);
2992 dataRecord.w2_cost = datarecord.cost;
2993 $("#w2_amount").jqxNumberInput({ max: 100000, readOnly: false }); // Set high max to enable the spinbuttons.
2994 calcWater();
2995 }
2996 });
2997 $("#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 });
2998 $("#w2_calcium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
2999 $("#w2_magnesium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3000 $("#w2_sodium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3001 $("#w2_total_alkalinity").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3002 $("#w2_chloride").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3003 $("#w2_sulfate").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3004 $("#w2_ph").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3005
3006 $("#wg_amount").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3007 $("#wg_calcium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3008 $("#wg_magnesium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3009 $("#wg_sodium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3010 $("#wg_total_alkalinity").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3011 $("#wg_chloride").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3012 $("#wg_sulfate").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3013 $("#wg_ph").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3014 $("#wb_calcium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3015 $("#wb_magnesium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3016 $("#wb_sodium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3017 $("#wb_total_alkalinity").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3018 $("#wb_chloride").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3019 $("#wb_sulfate").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3020 $("#wb_ph").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3021
3022 $("#pr_name").jqxDropDownList({
3023 placeHolder: "Kies doel profiel:",
3024 theme: theme,
3025 source: waterprofiles,
3026 displayMember: "name",
3027 width: 250,
3028 height: 27,
3029 dropDownWidth: 400,
3030 dropDownHeight: 300
3031 });
3032 $("#pr_name").on('select', function (event) {
3033 if (event.args) {
3034 var index = event.args.index;
3035 var datarecord = waterprofiles.records[index];
3036 $("#pr_calcium").val(datarecord.calcium);
3037 $("#pr_sulfate").val(datarecord.sulfate);
3038 $("#pr_chloride").val(datarecord.chloride);
3039 $("#pr_sodium").val(datarecord.sodium);
3040 $("#pr_magnesium").val(datarecord.magnesium);
3041 $("#pr_total_alkalinity").val(datarecord.total_alkalinity);
3042 }
3043 });
3044 $("#pr_calcium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3045 $("#pr_magnesium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3046 $("#pr_sodium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3047 $("#pr_total_alkalinity").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3048 $("#pr_chloride").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3049 $("#pr_sulfate").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3050
3051 $("#tgt_bu").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 2, readOnly: true });
3052 $("#tgt_cl_so4").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true });
3053
3054 $("#wa_cacl2").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 0, max: 1000, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1, symbol: ' gr', symbolPosition: 'right' });
3055 $("#wa_caso4").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 0, max: 1000, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1, symbol: ' gr', symbolPosition: 'right' });
3056 $("#wa_mgso4").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 0, max: 1000, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1, symbol: ' gr', symbolPosition: 'right' });
3057 $("#wa_nacl").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 0, max: 1000, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1, symbol: ' gr', symbolPosition: 'right' });
3058
3059 $("#calc_acid").jqxCheckBox({ theme: theme, width: 120, height: 23 });
3060 $("#wa_base_name").jqxDropDownList({ theme: theme, source: srcBase, width: 100, height: 23, dropDownHeight: 128 });
3061 $("#wa_base").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 0, decimalDigits: 2, spinButtons: true, spinButtonsStep: 0.05, symbol: ' gr', symbolPosition: 'right' });
3062 $("#wa_acid_name").jqxDropDownList({ theme: theme, source: srcAcid, width: 100, height: 23, dropDownHeight: 128 })
3063 $("#wa_acid").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 0, decimalDigits: 2, spinButtons: true, spinButtonsStep: 0.05, symbol: ' ml', symbolPosition: 'right' });
3064 $("#wa_acid_perc").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 80, height: 23, min: 0, max: 100, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right' });
3065
3066 $("#sparge_temp").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 70, max: 98, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 });
3067 $("#sparge_volume").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
3068 $("#sparge_ph").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 4.5, max: 6.5, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
3069 $("#sparge_source").jqxDropDownList({ theme: theme, source: srcSource, width: 100, height: 23, dropDownHeight: 95 });
3070 $("#sparge_acid_amount").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 100, height: 23, decimalDigits: 2, readOnly: true, symbol: ' ml', symbolPosition: 'right' });
3071 $("#sparge_acid_type").jqxDropDownList({ theme: theme, source: srcAcid, width: 100, height: 23, dropDownHeight: 128 });
3072 $("#sparge_acid_perc").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, spinButtons: true, decimalDigits: 0, symbol: '%', symbolPosition: 'right' });
3073 3091
3074 $('#jqxTabs').jqxTabs({ 3092 $('#jqxTabs').jqxTabs({
3075 theme: theme, 3093 theme: theme,
3076 width: 1280, 3094 width: 1280,
3077 height: 630, 3095 height: 630,

mercurial