--- a/www/js/prod_export.js Sat Sep 14 10:41:35 2019 +0200 +++ b/www/js/prod_export.js Fri Oct 18 13:12:46 2019 +0200 @@ -33,6 +33,12 @@ $("#jqxRadioButton4").jqxRadioButton({ theme: theme, width: 250, height: 23 }); $("#jqxRadioButton5").jqxRadioButton({ theme: theme, width: 250, height: 23 }); $("#jqxRadioButton6").jqxRadioButton({ theme: theme, width: 250, height: 23 }); + $("#jqxRadioButton7").jqxRadioButton({ theme: theme, width: 250, height: 23 }); + if ((my_split != 0) || (my_stage >= 6)) { + $("#jqxRadioButton3").jqxRadioButton({ disabled: true }); + document.getElementById("pmpt3").style.color = "red"; + } + $('#jqxRadioButton1').on('checked', function (event) { $('#Start').jqxButton({ disabled: false }); choice = 1; @@ -42,45 +48,46 @@ choice = 2; }); $('#jqxRadioButton3').on('checked', function (event) { - $('#Start').jqxButton({ disabled: false }); - choice = 3; - }); + $('#Start').jqxButton({ disabled: false }); + choice = 3; + }); $('#jqxRadioButton4').on('checked', function (event) { - $('#Start').jqxButton({ disabled: false }); - choice = 4; - }); + $('#Start').jqxButton({ disabled: false }); + choice = 4; + }); $('#jqxRadioButton5').on('checked', function (event) { $('#Start').jqxButton({ disabled: false }); choice = 5; }); $('#jqxRadioButton6').on('checked', function (event) { + $('#Start').jqxButton({ disabled: false }); + choice = 6; + }); + $('#jqxRadioButton7').on('checked', function (event) { $('#Start').jqxButton({ disabled: false }); - choice = 6; + choice = 7; }); $('#Start').jqxButton({ template: "success", width: '100px', theme: theme, disabled: true }); $('#Start').click(function () { if (choice == 1) { - var url="prod_beerxml.php?record=" + my_record; - window.open(url); + window.open('prod_beerxml.php?record=' + my_record); } else if (choice == 2) { - var url="prod_duplicate.php?record=" + my_record; - window.open(url); + window.open('prod_duplicate.php?record=' + my_record); } else if (choice == 3) { - var url="prod_torecipe.php?record=" + my_record; - window.open(url); + window.location.href = 'prod_divide.php?record=' + my_record + '&return=' + my_return; } else if (choice == 4) { - var url="prod_print.php?record=" + my_record; - window.open(url); + window.open('prod_torecipe.php?record=' + my_record); } else if (choice == 5) { - var url="prod_checklist.php?record=" + my_record; - window.open(url); + window.open('prod_print.php?record=' + my_record); } else if (choice == 6) { - var url="prod_forum.php?record=" + my_record; - window.open(url); + window.open('prod_checklist.php?record=' + my_record); + } else if (choice == 7) { + window.open('prod_forum.php?record=' + my_record); } // Return to the original product - window.location.href = "prod_edit.php?record=" + my_record + "&return=" + my_return; + if (choice != 3) + window.location.href = "prod_edit.php?record=" + my_record + "&return=" + my_return; }); });