1779 |
1779 |
1780 if (dataRecord.stage < 3) { // Primary |
1780 if (dataRecord.stage < 3) { // Primary |
1781 $('#jqxTabs').jqxTabs('disableAt', 9); // Fermentation tab |
1781 $('#jqxTabs').jqxTabs('disableAt', 9); // Fermentation tab |
1782 } else { |
1782 } else { |
1783 $('#jqxTabs').jqxTabs('enableAt', 9); |
1783 $('#jqxTabs').jqxTabs('enableAt', 9); |
|
1784 $("#name").jqxInput({ disabled: true }); |
|
1785 $("#code").jqxInput({ disabled: true }); |
1784 $("#batch_size").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
1786 $("#batch_size").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
1785 $("#boil_size").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
1787 $("#boil_size").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
1786 $("#boil_time").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
1788 $("#boil_time").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
1787 $("#efficiency").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
1789 $("#efficiency").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
1788 $("#est_og").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
1790 $("#est_og").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
1842 } |
1844 } |
1843 if (dataRecord.stage < 5) { // At least secondary |
1845 if (dataRecord.stage < 5) { // At least secondary |
1844 $('#jqxTabs').jqxTabs('disableAt', 10); // Packaging tab |
1846 $('#jqxTabs').jqxTabs('disableAt', 10); // Packaging tab |
1845 } else { |
1847 } else { |
1846 $('#jqxTabs').jqxTabs('enableAt', 10); |
1848 $('#jqxTabs').jqxTabs('enableAt', 10); |
|
1849 $("#primary_start_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
|
1850 $("#primary_max_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
|
1851 $("#primary_end_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
|
1852 $("#primary_end_sg").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
|
1853 $("#primary_end_brix").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
|
1854 $("#primary_end_date").jqxDateTimeInput({ disabled: true }); |
|
1855 $("#secondary_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
|
1856 $("#secondary_end_date").jqxDateTimeInput({ disabled: true }); |
|
1857 $("#tertiary_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
|
1858 $("#fg").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
|
1859 $("#final_brix").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
1847 } |
1860 } |
1848 if (dataRecord.stage < 6) { // Not yet packaged |
1861 if (dataRecord.stage < 6) { // Not yet packaged |
1849 $("#inventory_reduced").jqxCheckBox({ disabled : true }); |
1862 $("#inventory_reduced").jqxCheckBox({ disabled : true }); |
1850 } else { |
1863 } else { |
1851 if ($('#inventory_reduced').jqxCheckBox('checked')) |
1864 if ($('#inventory_reduced').jqxCheckBox('checked')) |
1852 $("#inventory_reduced").jqxCheckBox({ disabled : true }); |
1865 $("#inventory_reduced").jqxCheckBox({ disabled : true }); |
|
1866 $("#package_date").jqxDateTimeInput({ disabled: true }); |
|
1867 $("#bottle_amount").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
|
1868 $("#keg_amount").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
|
1869 $("#bottle_carbonation").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
|
1870 $("#keg_carbonation").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
|
1871 $("#bottle_priming_sugar").jqxDropDownList({ disabled: true }); |
|
1872 $("#keg_priming_sugar").jqxDropDownList({ disabled: true }); |
|
1873 $("#keg_forced_carb").jqxCheckBox({ disabled : true }); |
|
1874 $("#bottle_carbonation_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
|
1875 $("#keg_carbonation_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
1853 } |
1876 } |
1854 if (dataRecord.stage < 8) { // Taste when at least Mature. |
1877 if (dataRecord.stage < 8) { // Taste when at least Mature. |
1855 $('#jqxTabs').jqxTabs('disableAt', 11); // Tasting tab |
1878 $('#jqxTabs').jqxTabs('disableAt', 11); // Tasting tab |
1856 } else { |
1879 } else { |
1857 $('#jqxTabs').jqxTabs('enableAt', 11); |
1880 $('#jqxTabs').jqxTabs('enableAt', 11); |
|
1881 } |
|
1882 |
|
1883 if (dataRecord.stage > 9) { // Tasted |
|
1884 $("#taste_date").jqxDateTimeInput({ disabled: true }); |
|
1885 $("#taste_rate").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
|
1886 $("#taste_color").jqxInput({ disabled: true }); |
|
1887 $("#taste_transparency").jqxInput({ disabled: true }); |
|
1888 $("#taste_head").jqxInput({ disabled: true }); |
|
1889 $("#taste_aroma").jqxInput({ disabled: true }); |
|
1890 $("#taste_taste").jqxInput({ disabled: true }); |
|
1891 $("#taste_aftertaste").jqxInput({ disabled: true }); |
|
1892 $("#taste_mouthfeel").jqxInput({ disabled: true }); |
|
1893 $("#taste_notes").jqxInput({ disabled: true }); |
|
1894 } |
|
1895 |
|
1896 if (dataRecord.stage == 11) { // Locked |
|
1897 $("#notes").jqxInput({ disabled: true }); |
|
1898 } else { |
|
1899 $("#notes").jqxInput({ disabled: false }); |
1858 } |
1900 } |
1859 } |
1901 } |
1860 |
1902 |
1861 function showStarter() { |
1903 function showStarter() { |
1862 |
1904 |
3930 }); |
3972 }); |
3931 } |
3973 } |
3932 }); |
3974 }); |
3933 $("#locked").jqxCheckBox({ theme: theme, width: 120, height: 23, disabled : true }); |
3975 $("#locked").jqxCheckBox({ theme: theme, width: 120, height: 23, disabled : true }); |
3934 $('#locked').on('checked', function (event) { |
3976 $('#locked').on('checked', function (event) { |
3935 if (brewstage >= 10) { |
3977 if (dataRecord.stage >= 10) { |
3936 $("#stage").val('Closed'); |
|
3937 dataRecord.locked = 1; |
3978 dataRecord.locked = 1; |
3938 brewstage = 11; |
3979 dataRecord.stage = 11; |
|
3980 calcStage(); |
3939 } |
3981 } |
3940 }); |
3982 }); |
3941 $('#locked').on('unchecked', function (event) { |
3983 $('#locked').on('unchecked', function (event) { |
3942 if (brewstage >= 10) { |
3984 if (dataRecord.stage >= 10) { |
3943 $("#stage").val('Ready'); |
|
3944 dataRecord.locked = 0; |
3985 dataRecord.locked = 0; |
3945 brewstage = 10; |
3986 dataRecord.stage = 10; |
|
3987 calcStage(); |
3946 } |
3988 } |
3947 }); |
3989 }); |
3948 $("#notes").jqxTooltip({ content: 'De uitgebreide opmerkingen over dit product.' }); |
3990 $("#notes").jqxTooltip({ content: 'De uitgebreide opmerkingen over dit product.' }); |
3949 $("#notes").jqxInput({ theme: theme, width: 960, height: 100 }); |
3991 $("#notes").jqxInput({ theme: theme, width: 960, height: 100 }); |
3950 $("#type").jqxTooltip({ content: 'Het brouw type van dit recept.' }); |
3992 $("#type").jqxTooltip({ content: 'Het brouw type van dit recept.' }); |