1547 $("#name").val(dataRecord.name); |
1550 $("#name").val(dataRecord.name); |
1548 $("#code").val(dataRecord.code); |
1551 $("#code").val(dataRecord.code); |
1549 $("#birth").val(dataRecord.birth); |
1552 $("#birth").val(dataRecord.birth); |
1550 $("#stage").val(dataRecord.stage); |
1553 $("#stage").val(dataRecord.stage); |
1551 $("#notes").val(dataRecord.notes); |
1554 $("#notes").val(dataRecord.notes); |
1552 $("#log_brew").val(dataRecord.log_brew); |
|
1553 $("#log_fermentation").val(dataRecord.log_fermentation); |
|
1554 $("#inventory_reduced").val(dataRecord.inventory_reduced); |
1555 $("#inventory_reduced").val(dataRecord.inventory_reduced); |
1555 $("#locked").val(dataRecord.locked); |
1556 $("#locked").val(dataRecord.locked); |
1556 $("#eq_name").val(dataRecord.eq_name); |
1557 $("#eq_name").val(dataRecord.eq_name); |
1557 $("#eq_notes").val(dataRecord.eq_notes); |
1558 $("#eq_notes").val(dataRecord.eq_notes); |
1558 $("#eq_boil_size").val(dataRecord.eq_boil_size); |
1559 $("#eq_boil_size").val(dataRecord.eq_boil_size); |
1747 $("#Delete").jqxButton({ disabled: true }); |
1748 $("#Delete").jqxButton({ disabled: true }); |
1748 } |
1749 } |
1749 if (brewstage < 3) { |
1750 if (brewstage < 3) { |
1750 $('#jqxTabs').jqxTabs('disableAt', 9); |
1751 $('#jqxTabs').jqxTabs('disableAt', 9); |
1751 // If recipe not complete, disable 8 too. |
1752 // If recipe not complete, disable 8 too. |
1752 // $("#brew_log").jqxButton({ disabled: true }); |
|
1753 // $("#ferment_log").jqxButton({ disabled: true }); |
|
1754 } else { |
1753 } else { |
1755 $('#jqxTabs').jqxTabs('enableAt', 9); |
1754 $('#jqxTabs').jqxTabs('enableAt', 9); |
1756 // if (! dataRecord.log_brew) |
|
1757 // $("#brew_log").jqxButton({ disabled: true }); |
|
1758 // if (! dataRecord.log_fermentation) |
|
1759 // $("#ferment_log").jqxButton({ disabled: true }); |
|
1760 } |
1755 } |
1761 if (brewstage < 4) { // At least primary |
1756 if (brewstage < 4) { // At least primary |
1762 $('#jqxTabs').jqxTabs('disableAt', 10); |
1757 $('#jqxTabs').jqxTabs('disableAt', 10); |
1763 } else { |
1758 } else { |
1764 $('#jqxTabs').jqxTabs('enableAt', 10); |
1759 $('#jqxTabs').jqxTabs('enableAt', 10); |
2874 $("#code").jqxInput({ theme: theme, width: 100, height: 23 }); |
2869 $("#code").jqxInput({ theme: theme, width: 100, height: 23 }); |
2875 $("#birth").jqxTooltip({ content: 'De ontwerp datum van dit product.' }); |
2870 $("#birth").jqxTooltip({ content: 'De ontwerp datum van dit product.' }); |
2876 $("#birth").jqxInput({ theme: theme, width: 120, height: 23 }); |
2871 $("#birth").jqxInput({ theme: theme, width: 120, height: 23 }); |
2877 $("#stage").jqxTooltip({ content: 'De productie fase van dit product.' }); |
2872 $("#stage").jqxTooltip({ content: 'De productie fase van dit product.' }); |
2878 $("#stage").jqxInput({ theme: theme, width: 100, height: 23 }); |
2873 $("#stage").jqxInput({ theme: theme, width: 100, height: 23 }); |
2879 $("#log_brew").jqxCheckBox({ theme: theme, width: 120, height: 23, disabled : true }); |
|
2880 $("#log_fermentation").jqxCheckBox({ theme: theme, width: 120, height: 23, disabled : true }); |
|
2881 $("#inventory_reduced").jqxCheckBox({ theme: theme, width: 120, height: 23 }); |
2874 $("#inventory_reduced").jqxCheckBox({ theme: theme, width: 120, height: 23 }); |
2882 $('#inventory_reduced').on('checked', function (event) { |
2875 $('#inventory_reduced').on('checked', function (event) { |
2883 // Call a script to do the work and block this. |
2876 // Call a script to do the work and block this. |
2884 // Note that this script must set this flag too, so if the user doesn't Save it is still set. |
2877 // Note that this script must set this flag too, so if the user doesn't Save it is still set. |
2885 // Call the script with the uuid. |
2878 // Call the script with the uuid. |
3228 $("#brew_fermenter_extrawater").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 }); |
3221 $("#brew_fermenter_extrawater").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 }); |
3229 $("#brew_fermenter_sg").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 3 }); |
3222 $("#brew_fermenter_sg").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 3 }); |
3230 $("#brew_fermenter_extrasugar").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 }); |
3223 $("#brew_fermenter_extrasugar").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 }); |
3231 $("#brew_fermenter_ibu").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 0 }); |
3224 $("#brew_fermenter_ibu").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 0 }); |
3232 $("#brew_fermenter_color").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 0 }); |
3225 $("#brew_fermenter_color").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 0 }); |
|
3226 $("#BLog").jqxButton({ template: "info", width: '150px', theme: theme }); |
|
3227 $("#BLog").click(function () { |
|
3228 // Open log in a new tab. |
|
3229 var url="log_brew.php?code=" + dataRecord.code; |
|
3230 window.open(url); |
|
3231 }); |
3233 |
3232 |
3234 // Tab 10, Fermentation |
3233 // Tab 10, Fermentation |
3235 // Note, fermentation temps changes must do calcCarbonation() |
3234 // Note, fermentation temps changes must do calcCarbonation() |
3236 $("#brew_fermenter_sg2").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 3 }); |
3235 $("#brew_fermenter_sg2").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 3 }); |
3237 $("#primary_start_temp").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, max: 40, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 }); |
3236 $("#primary_start_temp").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, max: 40, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 }); |
3264 }); |
3263 }); |
3265 $("#tertiary_temp").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, max: 40, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 }); |
3264 $("#tertiary_temp").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, max: 40, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 }); |
3266 $("#fg").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 3, spinButtons: true, spinButtonsStep: 0.001 }); |
3265 $("#fg").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 3, spinButtons: true, spinButtonsStep: 0.001 }); |
3267 $("#final_abv").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); |
3266 $("#final_abv").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); |
3268 $("#final_svg").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); |
3267 $("#final_svg").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 }); |
|
3268 $("#FLog").jqxButton({ template: "info", width: '150px', theme: theme }); |
|
3269 $("#FLog").click(function () { |
|
3270 // Open log in a new tab. |
|
3271 var url="log_fermentation.php?code=" + dataRecord.code; |
|
3272 window.open(url); |
|
3273 }); |
3269 |
3274 |
3270 // Tab 11, Packaging |
3275 // Tab 11, Packaging |
3271 $("#package_date").jqxTooltip({ content: 'De verpakkings datum van dit bier.' }); |
3276 $("#package_date").jqxTooltip({ content: 'De verpakkings datum van dit bier.' }); |
3272 $("#package_date").jqxDateTimeInput({ |
3277 $("#package_date").jqxDateTimeInput({ |
3273 theme: theme, |
3278 theme: theme, |
3392 name: $("#name").val(), |
3397 name: $("#name").val(), |
3393 code: $("#code").val(), |
3398 code: $("#code").val(), |
3394 birth: $("#birth").val(), |
3399 birth: $("#birth").val(), |
3395 stage: $("#stage").val(), |
3400 stage: $("#stage").val(), |
3396 notes: $("#notes").val(), |
3401 notes: $("#notes").val(), |
3397 log_brew: $("#log_brew").val(), |
3402 log_brew: dataRecord.log_brew, |
3398 log_fermentation: $("#log_fermentation").val(), |
3403 log_fermentation: dataRecord.log_fermentation, |
3399 inventory_reduced: $("#inventory_reduced").val(), |
3404 inventory_reduced: $("#inventory_reduced").val(), |
3400 locked: $("#locked").val(), |
3405 locked: $("#locked").val(), |
3401 eq_name: $("#eq_name").val(), |
3406 eq_name: $("#eq_name").val(), |
3402 eq_boil_size: parseFloat($("#eq_boil_size").jqxNumberInput('decimal')), |
3407 eq_boil_size: parseFloat($("#eq_boil_size").jqxNumberInput('decimal')), |
3403 eq_batch_size: parseFloat($("#eq_batch_size").jqxNumberInput('decimal')), |
3408 eq_batch_size: parseFloat($("#eq_batch_size").jqxNumberInput('decimal')), |