diff -r bb55e065888a -r 3435646b230e www/js/prod_edit.js --- a/www/js/prod_edit.js Fri Mar 01 16:19:27 2019 +0100 +++ b/www/js/prod_edit.js Sat Mar 02 12:59:10 2019 +0100 @@ -1781,6 +1781,8 @@ $('#jqxTabs').jqxTabs('disableAt', 9); // Fermentation tab } else { $('#jqxTabs').jqxTabs('enableAt', 9); + $("#name").jqxInput({ disabled: true }); + $("#code").jqxInput({ disabled: true }); $("#batch_size").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); $("#boil_size").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); $("#boil_time").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); @@ -1844,18 +1846,58 @@ $('#jqxTabs').jqxTabs('disableAt', 10); // Packaging tab } else { $('#jqxTabs').jqxTabs('enableAt', 10); + $("#primary_start_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); + $("#primary_max_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); + $("#primary_end_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); + $("#primary_end_sg").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); + $("#primary_end_brix").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); + $("#primary_end_date").jqxDateTimeInput({ disabled: true }); + $("#secondary_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); + $("#secondary_end_date").jqxDateTimeInput({ disabled: true }); + $("#tertiary_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); + $("#fg").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); + $("#final_brix").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); } if (dataRecord.stage < 6) { // Not yet packaged $("#inventory_reduced").jqxCheckBox({ disabled : true }); } else { if ($('#inventory_reduced').jqxCheckBox('checked')) $("#inventory_reduced").jqxCheckBox({ disabled : true }); + $("#package_date").jqxDateTimeInput({ disabled: true }); + $("#bottle_amount").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); + $("#keg_amount").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); + $("#bottle_carbonation").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); + $("#keg_carbonation").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); + $("#bottle_priming_sugar").jqxDropDownList({ disabled: true }); + $("#keg_priming_sugar").jqxDropDownList({ disabled: true }); + $("#keg_forced_carb").jqxCheckBox({ disabled : true }); + $("#bottle_carbonation_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); + $("#keg_carbonation_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); } if (dataRecord.stage < 8) { // Taste when at least Mature. $('#jqxTabs').jqxTabs('disableAt', 11); // Tasting tab } else { $('#jqxTabs').jqxTabs('enableAt', 11); } + + if (dataRecord.stage > 9) { // Tasted + $("#taste_date").jqxDateTimeInput({ disabled: true }); + $("#taste_rate").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); + $("#taste_color").jqxInput({ disabled: true }); + $("#taste_transparency").jqxInput({ disabled: true }); + $("#taste_head").jqxInput({ disabled: true }); + $("#taste_aroma").jqxInput({ disabled: true }); + $("#taste_taste").jqxInput({ disabled: true }); + $("#taste_aftertaste").jqxInput({ disabled: true }); + $("#taste_mouthfeel").jqxInput({ disabled: true }); + $("#taste_notes").jqxInput({ disabled: true }); + } + + if (dataRecord.stage == 11) { // Locked + $("#notes").jqxInput({ disabled: true }); + } else { + $("#notes").jqxInput({ disabled: false }); + } } function showStarter() { @@ -3932,17 +3974,17 @@ }); $("#locked").jqxCheckBox({ theme: theme, width: 120, height: 23, disabled : true }); $('#locked').on('checked', function (event) { - if (brewstage >= 10) { - $("#stage").val('Closed'); + if (dataRecord.stage >= 10) { dataRecord.locked = 1; - brewstage = 11; + dataRecord.stage = 11; + calcStage(); } }); $('#locked').on('unchecked', function (event) { - if (brewstage >= 10) { - $("#stage").val('Ready'); + if (dataRecord.stage >= 10) { dataRecord.locked = 0; - brewstage = 10; + dataRecord.stage = 10; + calcStage(); } }); $("#notes").jqxTooltip({ content: 'De uitgebreide opmerkingen over dit product.' });