2386 width: 180, |
2386 width: 180, |
2387 height: 23, |
2387 height: 23, |
2388 autoDropDownHeight: true |
2388 autoDropDownHeight: true |
2389 }); |
2389 }); |
2390 $("#efficiency").jqxTooltip({ content: 'Het rendement van maischen en koken.' }); |
2390 $("#efficiency").jqxTooltip({ content: 'Het rendement van maischen en koken.' }); |
2391 $("#efficiency").jqxNumberInput( Perc1dec5 ); |
2391 $("#efficiency").jqxNumberInput( Perc1dec ); |
2392 $("#batch_size").jqxTooltip({ content: 'Het volume van het gekoelde wort na het koken.' }); |
2392 $("#batch_size").jqxTooltip({ content: 'Het volume van het gekoelde wort na het koken.' }); |
2393 $("#batch_size").jqxNumberInput( Spin1dec5 ); |
2393 $("#batch_size").jqxNumberInput( Spin1dec ); |
2394 $("#batch_size").jqxNumberInput({ min: 4 }); |
2394 $("#batch_size").jqxNumberInput({ min: 4 }); |
2395 $("#boil_size").jqxTooltip({ content: 'Het volume van het wort voor het koken.' }); |
2395 $("#boil_size").jqxTooltip({ content: 'Het volume van het wort voor het koken.' }); |
2396 $("#boil_size").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 2, readOnly: true }); |
2396 $("#boil_size").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 2, readOnly: true }); |
2397 $("#boil_time").jqxTooltip({ content: 'De kooktijd in minuten.' }); |
2397 $("#boil_time").jqxTooltip({ content: 'De kooktijd in minuten.' }); |
2398 $("#boil_time").jqxNumberInput( PosInt ); |
2398 $("#boil_time").jqxNumberInput( PosInt ); |
2547 rowdata.f_di_ph = datarecord.di_ph; |
2547 rowdata.f_di_ph = datarecord.di_ph; |
2548 rowdata.f_acid_to_ph_57 = datarecord.acid_to_ph_57; |
2548 rowdata.f_acid_to_ph_57 = datarecord.acid_to_ph_57; |
2549 rowdata.f_inventory = datarecord.inventory; |
2549 rowdata.f_inventory = datarecord.inventory; |
2550 } |
2550 } |
2551 }); |
2551 }); |
2552 $("#wf_amount").jqxNumberInput( Spin3dec5 ); |
2552 $("#wf_amount").jqxNumberInput( Spin3dec ); |
2553 $('#wf_amount').on('change', function (event) { |
2553 $('#wf_amount').on('change', function (event) { |
2554 console.log("amount changed: "+event.args.value); |
2554 console.log("amount changed: "+event.args.value); |
2555 $("#fermentableGrid").jqxGrid('setcellvalue', fermentableRow, 'f_amount', event.args.value); |
2555 $("#fermentableGrid").jqxGrid('setcellvalue', fermentableRow, 'f_amount', event.args.value); |
2556 if (! to_100) { |
2556 if (! to_100) { |
2557 // Recalculate percentages |
2557 // Recalculate percentages |
2574 $("#fermentableGrid").jqxGrid('setcellvalue', 0, "f_percentage", 100); |
2574 $("#fermentableGrid").jqxGrid('setcellvalue', 0, "f_percentage", 100); |
2575 } |
2575 } |
2576 calcFermentables(); |
2576 calcFermentables(); |
2577 }; |
2577 }; |
2578 }); |
2578 }); |
2579 $("#wf_percentage").jqxNumberInput( Perc1dec1 ); |
2579 $("#wf_percentage").jqxNumberInput( Perc1dec ); |
2580 $("#wf_percentage").on('change', function (event) { |
2580 $("#wf_percentage").on('change', function (event) { |
2581 var oldvalue = Math.round(fermentableData.f_percentage * 10) / 10.0; |
2581 var oldvalue = Math.round(fermentableData.f_percentage * 10) / 10.0; |
2582 var newvalue = event.args.value; |
2582 var newvalue = event.args.value; |
2583 console.log("percentage changed: "+newvalue+" old: "+oldvalue); |
2583 console.log("percentage changed: "+newvalue+" old: "+oldvalue); |
2584 var rowscount = $("#fermentableGrid").jqxGrid('getdatainformation').rowscount; |
2584 var rowscount = $("#fermentableGrid").jqxGrid('getdatainformation').rowscount; |
2727 rowdata.h_myrcene = datarecord.myrcene; |
2727 rowdata.h_myrcene = datarecord.myrcene; |
2728 rowdata.h_total_oil = datarecord.total_oil; |
2728 rowdata.h_total_oil = datarecord.total_oil; |
2729 rowdata.h_inventory = datarecord.inventory; |
2729 rowdata.h_inventory = datarecord.inventory; |
2730 } |
2730 } |
2731 }); |
2731 }); |
2732 $("#wh_amount").jqxNumberInput( Spin1dec1 ); |
2732 $("#wh_amount").jqxNumberInput( Spin1dec ); |
2733 $('#wh_amount').on('change', function (event) { |
2733 $('#wh_amount').on('change', function (event) { |
2734 console.log("amount changed: "+event.args.value); |
2734 console.log("amount changed: "+event.args.value); |
2735 var amount = parseFloat(event.args.value) / 1000; |
2735 var amount = parseFloat(event.args.value) / 1000; |
2736 var rowdata = $("#hopGrid").jqxGrid('getrowdata', hopRow); |
2736 var rowdata = $("#hopGrid").jqxGrid('getrowdata', hopRow); |
2737 |
2737 |
2851 rowdata.m_use_use = datarecord.use_use; |
2851 rowdata.m_use_use = datarecord.use_use; |
2852 rowdata.m_amount_is_weight = datarecord.amount_is_weight; |
2852 rowdata.m_amount_is_weight = datarecord.amount_is_weight; |
2853 rowdata.m_inventory = datarecord.inventory; |
2853 rowdata.m_inventory = datarecord.inventory; |
2854 } |
2854 } |
2855 }); |
2855 }); |
2856 $("#wm_amount").jqxNumberInput( Spin1dec1 ); |
2856 $("#wm_amount").jqxNumberInput( Spin1dec ); |
2857 $('#wm_amount').on('change', function (event) { |
2857 $('#wm_amount').on('change', function (event) { |
2858 console.log("amount changed: "+event.args.value); |
2858 console.log("amount changed: "+event.args.value); |
2859 var amount = parseFloat(event.args.value) / 1000; |
2859 var amount = parseFloat(event.args.value) / 1000; |
2860 var rowdata = $("#miscGrid").jqxGrid('getrowdata', miscRow); |
2860 var rowdata = $("#miscGrid").jqxGrid('getrowdata', miscRow); |
2861 rowdata.m_amount = amount; |
2861 rowdata.m_amount = amount; |
2980 calcSVG(); |
2980 calcSVG(); |
2981 calcFG(); |
2981 calcFG(); |
2982 calcABV(); |
2982 calcABV(); |
2983 } |
2983 } |
2984 }); |
2984 }); |
2985 $("#wy_amount").jqxNumberInput( Spin1dec5 ); |
2985 $("#wy_amount").jqxNumberInput( Spin1dec ); |
2986 $('#wy_amount').on('change', function (event) { |
2986 $('#wy_amount').on('change', function (event) { |
2987 console.log("amount changed: "+event.args.value); |
2987 console.log("amount changed: "+event.args.value); |
2988 var rowdata = $("#yeastGrid").jqxGrid('getrowdata', yeastRow); |
2988 var rowdata = $("#yeastGrid").jqxGrid('getrowdata', yeastRow); |
2989 if (rowdata.y_form == 0) // Liquid |
2989 if (rowdata.y_form == 0) // Liquid |
2990 var amount = parseFloat(event.args.value); |
2990 var amount = parseFloat(event.args.value); |
3108 if (row.step_type == 0) // Infusion |
3108 if (row.step_type == 0) // Infusion |
3109 mash_infuse += parseFloat(row.step_infuse_amount); |
3109 mash_infuse += parseFloat(row.step_infuse_amount); |
3110 } |
3110 } |
3111 } |
3111 } |
3112 }); |
3112 }); |
3113 $("#wstep_temp").jqxNumberInput( Spin1dec5 ); |
3113 $("#wstep_temp").jqxNumberInput( Spin1dec ); |
3114 $('#wstep_temp').on('change', function (event) { |
3114 $('#wstep_temp').on('change', function (event) { |
3115 var rowdata = $("#mashGrid").jqxGrid('getrowdata', mashRow); |
3115 var rowdata = $("#mashGrid").jqxGrid('getrowdata', mashRow); |
3116 rowdata.step_temp = parseFloat(event.args.value); |
3116 rowdata.step_temp = parseFloat(event.args.value); |
3117 }); |
3117 }); |
3118 $("#wend_temp").jqxNumberInput( Spin1dec5 ); |
3118 $("#wend_temp").jqxNumberInput( Spin1dec ); |
3119 $('#wend_temp').on('change', function (event) { |
3119 $('#wend_temp').on('change', function (event) { |
3120 var rowdata = $("#mashGrid").jqxGrid('getrowdata', mashRow); |
3120 var rowdata = $("#mashGrid").jqxGrid('getrowdata', mashRow); |
3121 rowdata.end_temp = parseFloat(event.args.value); |
3121 rowdata.end_temp = parseFloat(event.args.value); |
3122 }); |
3122 }); |
3123 $("#wstep_time").jqxNumberInput( PosInt ); |
3123 $("#wstep_time").jqxNumberInput( PosInt ); |
3128 $("#wramp_time").jqxNumberInput( PosInt ); |
3128 $("#wramp_time").jqxNumberInput( PosInt ); |
3129 $('#wramp_time').on('change', function (event) { |
3129 $('#wramp_time').on('change', function (event) { |
3130 var rowdata = $("#mashGrid").jqxGrid('getrowdata', mashRow); |
3130 var rowdata = $("#mashGrid").jqxGrid('getrowdata', mashRow); |
3131 rowdata.ramp_time = parseFloat(event.args.value); |
3131 rowdata.ramp_time = parseFloat(event.args.value); |
3132 }); |
3132 }); |
3133 $("#wstep_infuse_amount").jqxNumberInput( Spin1dec5 ); |
3133 $("#wstep_infuse_amount").jqxNumberInput( Spin1dec ); |
3134 $('#wstep_infuse_amount').on('change', function (event) { |
3134 $('#wstep_infuse_amount').on('change', function (event) { |
3135 var rowdata = $("#mashGrid").jqxGrid('getrowdata', mashRow); |
3135 var rowdata = $("#mashGrid").jqxGrid('getrowdata', mashRow); |
3136 rowdata.step_infuse_amount = parseFloat(event.args.value); |
3136 rowdata.step_infuse_amount = parseFloat(event.args.value); |
3137 mash_infuse = 0; |
3137 mash_infuse = 0; |
3138 var rows = $('#mashGrid').jqxGrid('getrows'); |
3138 var rows = $('#mashGrid').jqxGrid('getrows'); |
3287 $("#pr_chloride").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); |
3287 $("#pr_chloride").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); |
3288 $("#pr_sulfate").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); |
3288 $("#pr_sulfate").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); |
3289 |
3289 |
3290 // Water agents |
3290 // Water agents |
3291 $("#wa_cacl2").jqxTooltip({ content: 'Voor het maken van een ander waterprofiel. Voegt calcium en chloride toe. Voor het verbeteren van zoetere bieren.'}); |
3291 $("#wa_cacl2").jqxTooltip({ content: 'Voor het maken van een ander waterprofiel. Voegt calcium en chloride toe. Voor het verbeteren van zoetere bieren.'}); |
3292 $("#wa_cacl2").jqxNumberInput( Spin1dec1 ); |
3292 $("#wa_cacl2").jqxNumberInput( Spin1dec ); |
3293 $("#wa_caso4").jqxTooltip({ content: 'Gips. Voor het maken van een ander waterprofiel. Voegt calcium en sulfaat toe. Voor het verbeteren van bittere bieren.'}); |
3293 $("#wa_caso4").jqxTooltip({ content: 'Gips. Voor het maken van een ander waterprofiel. Voegt calcium en sulfaat toe. Voor het verbeteren van bittere bieren.'}); |
3294 $("#wa_caso4").jqxNumberInput( Spin1dec1 ); |
3294 $("#wa_caso4").jqxNumberInput( Spin1dec ); |
3295 $("#wa_mgso4").jqxTooltip({ content: 'Epsom zout. Voor het maken van een ander waterprofiel. Voegt magnesium en sulfaat toe. Gebruik spaarzaam!'}); |
3295 $("#wa_mgso4").jqxTooltip({ content: 'Epsom zout. Voor het maken van een ander waterprofiel. Voegt magnesium en sulfaat toe. Gebruik spaarzaam!'}); |
3296 $("#wa_mgso4").jqxNumberInput( Spin1dec1 ); |
3296 $("#wa_mgso4").jqxNumberInput( Spin1dec ); |
3297 $("#wa_nacl").jqxTooltip({ content: 'Keukenzout. Voor het maken van een ander waterprofiel. Voegt natrium en chloride toe. Voor het accentueren van zoetheid. Bij hoge dosering wordt het bier ziltig.'}); |
3297 $("#wa_nacl").jqxTooltip({ content: 'Keukenzout. Voor het maken van een ander waterprofiel. Voegt natrium en chloride toe. Voor het accentueren van zoetheid. Bij hoge dosering wordt het bier ziltig.'}); |
3298 $("#wa_nacl").jqxNumberInput( Spin1dec1 ); |
3298 $("#wa_nacl").jqxNumberInput( Spin1dec ); |
3299 $("#mash_ph").jqxTooltip({ content: 'Maisch pH tussen 5.2 en 5.6. Gebruik 5.2 voor lichte en 5.5 voor donkere bieren.'}); |
3299 $("#mash_ph").jqxTooltip({ content: 'Maisch pH tussen 5.2 en 5.6. Gebruik 5.2 voor lichte en 5.5 voor donkere bieren.'}); |
3300 $("#mash_ph").jqxNumberInput( SpinpH ); |
3300 $("#mash_ph").jqxNumberInput( SpinpH ); |
3301 $("#calc_acid").jqxCheckBox({ theme: theme, width: 120, height: 23 }); |
3301 $("#calc_acid").jqxCheckBox({ theme: theme, width: 120, height: 23 }); |
3302 $("#wa_base_name").jqxDropDownList({ |
3302 $("#wa_base_name").jqxDropDownList({ |
3303 theme: theme, |
3303 theme: theme, |
3306 displayMember: 'nl', |
3306 displayMember: 'nl', |
3307 width: 170, |
3307 width: 170, |
3308 height: 23, |
3308 height: 23, |
3309 autoDropDownHeight: true |
3309 autoDropDownHeight: true |
3310 }); |
3310 }); |
3311 $("#wa_base").jqxNumberInput( Spin2dec5 ); |
3311 $("#wa_base").jqxNumberInput( Spin2dec ); |
3312 $("#wa_base").jqxNumberInput({ symbol: ' gr', symbolPosition: 'right' }); |
3312 $("#wa_base").jqxNumberInput({ symbol: ' gr', symbolPosition: 'right' }); |
3313 $("#wa_acid_name").jqxDropDownList({ |
3313 $("#wa_acid_name").jqxDropDownList({ |
3314 theme: theme, |
3314 theme: theme, |
3315 source: AcidTypeAdapter, |
3315 source: AcidTypeAdapter, |
3316 valueMember: 'id', |
3316 valueMember: 'id', |
3317 displayMember: 'nl', |
3317 displayMember: 'nl', |
3318 width: 170, |
3318 width: 170, |
3319 height: 23, |
3319 height: 23, |
3320 autoDropDownHeight: true |
3320 autoDropDownHeight: true |
3321 }); |
3321 }); |
3322 $("#wa_acid").jqxNumberInput( Spin2dec5 ); |
3322 $("#wa_acid").jqxNumberInput( Spin2dec ); |
3323 $("#wa_acid").jqxNumberInput({ symbol: ' ml', symbolPosition: 'right' }); |
3323 $("#wa_acid").jqxNumberInput({ symbol: ' ml', symbolPosition: 'right' }); |
3324 $("#wa_acid_perc").jqxNumberInput( Perc0 ); |
3324 $("#wa_acid_perc").jqxNumberInput( Perc0 ); |
3325 $("#wa_acid_perc").jqxNumberInput({ width: 70, symbol: '%', symbolPosition: 'right' }); |
3325 $("#wa_acid_perc").jqxNumberInput({ width: 70, symbol: '%', symbolPosition: 'right' }); |
3326 // Sparge water |
3326 // Sparge water |
3327 $("#sparge_temp").jqxNumberInput( Spin1dec5 ); |
3327 $("#sparge_temp").jqxNumberInput( Spin1dec ); |
3328 $("#sparge_volume").jqxNumberInput( Spin1dec5 ); |
3328 $("#sparge_volume").jqxNumberInput( Spin1dec ); |
3329 $("#sparge_ph").jqxNumberInput( SpinpH ); |
3329 $("#sparge_ph").jqxNumberInput( SpinpH ); |
3330 $("#sparge_source").jqxDropDownList({ |
3330 $("#sparge_source").jqxDropDownList({ |
3331 theme: theme, |
3331 theme: theme, |
3332 source: SpargeSourceAdapter, |
3332 source: SpargeSourceAdapter, |
3333 valueMember: 'id', |
3333 valueMember: 'id', |
3334 displayMember: 'nl', |
3334 displayMember: 'nl', |
3335 width: 110, |
3335 width: 110, |
3336 height: 23, |
3336 height: 23, |
3337 autoDropDownHeight: true |
3337 autoDropDownHeight: true |
3338 }); |
3338 }); |
3339 $("#sparge_acid_amount").jqxNumberInput( Spin2dec1 ); |
3339 $("#sparge_acid_amount").jqxNumberInput( Spin2dec ); |
3340 $("#sparge_acid_amount").jqxNumberInput({ spinButtons: false, readOnly: true, symbol: ' ml', symbolPosition: 'right' }); |
3340 $("#sparge_acid_amount").jqxNumberInput({ spinButtons: false, readOnly: true, symbol: ' ml', symbolPosition: 'right' }); |
3341 $("#sparge_acid_type").jqxDropDownList({ |
3341 $("#sparge_acid_type").jqxDropDownList({ |
3342 theme: theme, |
3342 theme: theme, |
3343 source: AcidTypeAdapter, |
3343 source: AcidTypeAdapter, |
3344 valueMember: 'id', |
3344 valueMember: 'id', |