diff -r 3cccf4392a25 -r 55a246085522 www/js/rec_export.js --- a/www/js/rec_export.js Fri Oct 18 19:24:05 2019 +0200 +++ b/www/js/rec_export.js Fri Oct 18 20:04:40 2019 +0200 @@ -21,51 +21,50 @@ *****************************************************************************/ -$(document).ready(function () { - - var choice = 0; +$(document).ready(function() { - $("#name").html(my_name); - $("#jqxRadioButton1").jqxRadioButton({ theme: theme, width: 250, height: 23 }); - $("#jqxRadioButton2").jqxRadioButton({ theme: theme, width: 250, height: 23 }); - $("#jqxRadioButton3").jqxRadioButton({ theme: theme, width: 250, height: 23 }); - $("#jqxRadioButton4").jqxRadioButton({ theme: theme, width: 250, height: 23 }); - $("#jqxRadioButton5").jqxRadioButton({ theme: theme, width: 250, height: 23 }); - $('#jqxRadioButton1').on('checked', function (event) { - $('#Start').jqxButton({ disabled: false }); - choice = 1; - }); - $('#jqxRadioButton2').on('checked', function (event) { - $('#Start').jqxButton({ disabled: false }); - choice = 2; - }); - $('#jqxRadioButton3').on('checked', function (event) { - $('#Start').jqxButton({ disabled: false }); - choice = 3; - }); - $('#jqxRadioButton4').on('checked', function (event) { - $('#Start').jqxButton({ disabled: false }); - choice = 4; - }); - $('#jqxRadioButton5').on('checked', function (event) { - $('#Start').jqxButton({ disabled: false }); - choice = 5; - }); + var choice = 0; + $('#name').html(my_name); + $('#jqxRadioButton1').jqxRadioButton({ theme: theme, width: 250, height: 23 }); + $('#jqxRadioButton2').jqxRadioButton({ theme: theme, width: 250, height: 23 }); + $('#jqxRadioButton3').jqxRadioButton({ theme: theme, width: 250, height: 23 }); + $('#jqxRadioButton4').jqxRadioButton({ theme: theme, width: 250, height: 23 }); + $('#jqxRadioButton5').jqxRadioButton({ theme: theme, width: 250, height: 23 }); + $('#jqxRadioButton1').on('checked', function(event) { + $('#Start').jqxButton({ disabled: false }); + choice = 1; + }); + $('#jqxRadioButton2').on('checked', function(event) { + $('#Start').jqxButton({ disabled: false }); + choice = 2; + }); + $('#jqxRadioButton3').on('checked', function(event) { + $('#Start').jqxButton({ disabled: false }); + choice = 3; + }); + $('#jqxRadioButton4').on('checked', function(event) { + $('#Start').jqxButton({ disabled: false }); + choice = 4; + }); + $('#jqxRadioButton5').on('checked', function(event) { + $('#Start').jqxButton({ disabled: false }); + choice = 5; + }); - $('#Start').jqxButton({ template: "success", width: '100px', theme: theme, disabled: true }); - $('#Start').click(function () { - if (choice == 1) { - window.open('rec_beerxml.php?record=' + my_record); - } else if (choice == 2) { - window.open('rec_duplicate.php?record=' + my_record); - } else if (choice == 3) { - window.open('rec_toproduct.php?record=' + my_record); - } else if (choice == 4) { - window.open('rec_print.php?record=' + my_record); - } else if (choice == 5) { - window.open('rec_forum.php?record=' + my_record); - } - // Return to the original recipe - window.location.href = "rec_edit.php?record=" + my_record + "&return=" + my_return; - }); + $('#Start').jqxButton({ template: 'success', width: '100px', theme: theme, disabled: true }); + $('#Start').click(function() { + if (choice == 1) { + window.open('rec_beerxml.php?record=' + my_record); + } else if (choice == 2) { + window.open('rec_duplicate.php?record=' + my_record); + } else if (choice == 3) { + window.open('rec_toproduct.php?record=' + my_record); + } else if (choice == 4) { + window.open('rec_print.php?record=' + my_record); + } else if (choice == 5) { + window.open('rec_forum.php?record=' + my_record); + } + // Return to the original recipe + window.location.href = 'rec_edit.php?record=' + my_record + '&return=' + my_return; + }); });