3358 $('#bottle_carbonation').jqxTooltip({ content: 'Het gewenste CO2 volume in de flessen.' }); |
3358 $('#bottle_carbonation').jqxTooltip({ content: 'Het gewenste CO2 volume in de flessen.' }); |
3359 $('#keg_carbonation').jqxTooltip({ content: 'Het gewenste CO2 volume door de suiker in de fusten.' }); |
3359 $('#keg_carbonation').jqxTooltip({ content: 'Het gewenste CO2 volume door de suiker in de fusten.' }); |
3360 $('#bottle_priming_water,#keg_priming_water').jqxTooltip({ content: 'De hoeveelheid water om de suiker op te lossen.' }); |
3360 $('#bottle_priming_water,#keg_priming_water').jqxTooltip({ content: 'De hoeveelheid water om de suiker op te lossen.' }); |
3361 $('#bottle_pressure').jqxTooltip({ content: 'De maximaal te verwachten druk tijdens het hergisten.' }); |
3361 $('#bottle_pressure').jqxTooltip({ content: 'De maximaal te verwachten druk tijdens het hergisten.' }); |
3362 $('#package_date').jqxDateTimeInput(Dateopts); |
3362 $('#package_date').jqxDateTimeInput(Dateopts); |
3363 $('#package_infuse_amount').jqxNumberInput(Spin3dec); |
3363 $('#package_date').jqxDateTimeInput({ disabled: true }); |
|
3364 $('#package_infuse_amount').jqxNumberInput(Show3dec); |
3364 $('#package_infuse_notes').jqxInput({ theme: theme, width: 640, height: 23 }); |
3365 $('#package_infuse_notes').jqxInput({ theme: theme, width: 640, height: 23 }); |
3365 $('#package_abv').jqxNumberInput(Show2dec); |
3366 $('#package_abv').jqxNumberInput(Show2dec); |
3366 $('#package_ph').jqxNumberInput(SpinpH); |
3367 $('#package_ph').jqxNumberInput(Show2dec); |
3367 $('#st_carb_min2,#st_carb_max2').jqxNumberInput(Smal1dec); |
3368 $('#st_carb_min2,#st_carb_max2').jqxNumberInput(Smal1dec); |
3368 $('#package_volume,#package_infuse_abv,#bottle_amount,#keg_amount').jqxNumberInput(Spin1dec); |
3369 $('#package_volume,#package_infuse_abv,#bottle_amount,#keg_amount').jqxNumberInput(Show1dec); |
3369 $('#bottle_carbonation,#keg_carbonation').jqxNumberInput(Spin2dec); |
3370 $('#bottle_carbonation,#keg_carbonation').jqxNumberInput(Show2dec); |
3370 $('#bottle_carbonation,#keg_carbonation').jqxNumberInput({ max: 5 }); |
3371 $('#bottle_priming_sugar').jqxInput({ theme: theme, width: 200, height: 23 }); |
3371 $('#bottle_priming_sugar').jqxDropDownList({ |
3372 $('#keg_priming_sugar').jqxInput({ theme: theme, width: 200, height: 23 }); |
3372 placeHolder: 'Kies suiker:', |
3373 $('#bottle_priming_water,#keg_priming_water').jqxNumberInput(Show3dec); |
3373 theme: theme, |
3374 $('#keg_forced_carb').jqxCheckBox({ theme: theme, width: 120, height: 23, disabled: true }); |
3374 source: fermentablesugars, |
|
3375 displayMember: 'name', |
|
3376 width: 200, |
|
3377 height: 23, |
|
3378 dropDownWidth: 300, |
|
3379 dropDownHeight: 400 |
|
3380 }); |
|
3381 $('#bottle_priming_sugar').on('select', function(event) { |
|
3382 if (event.args) { |
|
3383 var rowID, index, editrow = -1, datarecord, rows, i, row = {}; |
|
3384 index = event.args.index; |
|
3385 datarecord = fermentablesugars.records[index]; |
|
3386 rows = $('#fermentableGrid').jqxGrid('getrows'); |
|
3387 for (i = 0; i < rows.length; i++) { |
|
3388 if (rows[i].f_added == 4) { |
|
3389 editrow = i; |
|
3390 } |
|
3391 } |
|
3392 row['f_name'] = datarecord.name; |
|
3393 row['f_origin'] = datarecord.origin; |
|
3394 row['f_supplier'] = datarecord.supplier; |
|
3395 row['f_amount'] = parseFloat($('#bottle_priming_total').jqxNumberInput('decimal')) / 1000; |
|
3396 row['f_cost'] = datarecord.cost; |
|
3397 row['f_type'] = datarecord.type; |
|
3398 row['f_yield'] = datarecord.yield; |
|
3399 row['f_color'] = datarecord.color; |
|
3400 row['f_coarse_fine_diff'] = datarecord.coarse_fine_diff; |
|
3401 row['f_moisture'] = datarecord.moisture; |
|
3402 row['f_diastatic_power'] = datarecord.diastatic_power; |
|
3403 row['f_protein'] = datarecord.protein; |
|
3404 row['f_max_in_batch'] = datarecord.max_in_batch; |
|
3405 row['f_graintype'] = datarecord.graintype; |
|
3406 row['f_added'] = 4; |
|
3407 row['f_dissolved_protein'] = datarecord.dissolved_protein; |
|
3408 row['f_recommend_mash'] = datarecord.recommend_mash; |
|
3409 row['f_add_after_boil'] = 1; |
|
3410 row['f_adjust_to_total_100'] = 0; |
|
3411 row['f_percentage'] = 0; |
|
3412 row['f_di_ph'] = datarecord.di_ph; |
|
3413 row['f_acid_to_ph_57'] = datarecord.acid_to_ph_57; |
|
3414 row['f_inventory'] = datarecord.inventory; |
|
3415 if (editrow >= 0) { |
|
3416 rowID = $('#fermentableGrid').jqxGrid('getrowid', editrow); |
|
3417 $('#fermentableGrid').jqxGrid('updaterow', rowID, row); |
|
3418 } else { |
|
3419 $('#fermentableGrid').jqxGrid('addrow', null, row); |
|
3420 } |
|
3421 // calcCarbonation(); |
|
3422 } |
|
3423 }); |
|
3424 $('#keg_priming_sugar').jqxDropDownList({ |
|
3425 placeHolder: 'Kies suiker:', |
|
3426 theme: theme, |
|
3427 source: fermentablesugars, |
|
3428 displayMember: 'name', |
|
3429 width: 200, |
|
3430 height: 23, |
|
3431 dropDownWidth: 300, |
|
3432 dropDownHeight: 400 |
|
3433 }); |
|
3434 $('#keg_priming_sugar').on('select', function(event) { |
|
3435 if (event.args) { |
|
3436 var rowID, index, editrow = -1, datarecord, rows, i, row = {}; |
|
3437 index = event.args.index; |
|
3438 datarecord = fermentablesugars.records[index]; |
|
3439 rows = $('#fermentableGrid').jqxGrid('getrows'); |
|
3440 for (i = 0; i < rows.length; i++) { |
|
3441 if (rows[i].f_added == 5) { |
|
3442 editrow = i; |
|
3443 } |
|
3444 } |
|
3445 row['f_name'] = datarecord.name; |
|
3446 row['f_origin'] = datarecord.origin; |
|
3447 row['f_supplier'] = datarecord.supplier; |
|
3448 row['f_amount'] = parseFloat($('#keg_priming_total').jqxNumberInput('decimal')) / 1000; |
|
3449 row['f_cost'] = datarecord.cost; |
|
3450 row['f_type'] = datarecord.type; |
|
3451 row['f_yield'] = datarecord.yield; |
|
3452 row['f_color'] = datarecord.color; |
|
3453 row['f_coarse_fine_diff'] = datarecord.coarse_fine_diff; |
|
3454 row['f_moisture'] = datarecord.moisture; |
|
3455 row['f_diastatic_power'] = datarecord.diastatic_power; |
|
3456 row['f_protein'] = datarecord.protein; |
|
3457 row['f_max_in_batch'] = datarecord.max_in_batch; |
|
3458 row['f_graintype'] = datarecord.graintype; |
|
3459 row['f_added'] = 5; |
|
3460 row['f_dissolved_protein'] = datarecord.dissolved_protein; |
|
3461 row['f_recommend_mash'] = datarecord.recommend_mash; |
|
3462 row['f_add_after_boil'] = 1; |
|
3463 row['f_adjust_to_total_100'] = 0; |
|
3464 row['f_percentage'] = 0; |
|
3465 row['f_di_ph'] = datarecord.di_ph; |
|
3466 row['f_acid_to_ph_57'] = datarecord.acid_to_ph_57; |
|
3467 row['f_inventory'] = datarecord.inventory; |
|
3468 if (editrow >= 0) { |
|
3469 rowID = $('#fermentableGrid').jqxGrid('getrowid', editrow); |
|
3470 $('#fermentableGrid').jqxGrid('updaterow', rowID, row); |
|
3471 } else { |
|
3472 $('#fermentableGrid').jqxGrid('addrow', null, row); |
|
3473 } |
|
3474 // calcCarbonation(); |
|
3475 } |
|
3476 }); |
|
3477 $('#bottle_priming_water,#keg_priming_water').jqxNumberInput(Spin3dec); |
|
3478 $('#keg_forced_carb').jqxCheckBox({ theme: theme, width: 120, height: 23 }); |
|
3479 $('#bottle_priming_amount,#keg_priming_amount,#bottle_priming_total,#bottle_pressure,#keg_priming_total,#keg_pressure').jqxNumberInput(Show1dec); |
3375 $('#bottle_priming_amount,#keg_priming_amount,#bottle_priming_total,#bottle_pressure,#keg_priming_total,#keg_pressure').jqxNumberInput(Show1dec); |
3480 $('#bottle_abv,#keg_abv').jqxNumberInput(Show2dec); |
3376 $('#bottle_abv,#keg_abv').jqxNumberInput(Show2dec); |
3481 $('#bottle_carbonation_temp,#keg_carbonation_temp').jqxNumberInput(YeastT); |
3377 $('#bottle_carbonation_temp,#keg_carbonation_temp').jqxNumberInput(Show1dec); |
3482 $('#CLog').jqxButton({ template: 'info', width: '150px', theme: theme }); |
3378 $('#CLog').jqxButton({ template: 'info', width: '150px', theme: theme }); |
3483 $('#CLog').click(function() { |
3379 $('#CLog').click(function() { |
3484 // Open log in a new tab. |
3380 // Open log in a new tab. |
3485 window.open('log_co2pressure.php?code=' + dataRecord.code + '&name=' + dataRecord.name); |
3381 window.open('log_co2pressure.php?code=' + dataRecord.code + '&name=' + dataRecord.name); |
3486 }); |
3382 }); |