19 * along with ThermFerm; see the file COPYING. If not, write to the Free |
19 * along with ThermFerm; see the file COPYING. If not, write to the Free |
20 * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
20 * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
21 *****************************************************************************/ |
21 *****************************************************************************/ |
22 |
22 |
23 |
23 |
24 $(document).ready(function () { |
24 $(document).ready(function() { |
25 |
25 |
26 var choice = 0; |
26 var choice = 0; |
|
27 $('#name').html(my_name); |
|
28 $('#jqxRadioButton1').jqxRadioButton({ theme: theme, width: 250, height: 23 }); |
|
29 $('#jqxRadioButton2').jqxRadioButton({ theme: theme, width: 250, height: 23 }); |
|
30 $('#jqxRadioButton3').jqxRadioButton({ theme: theme, width: 250, height: 23 }); |
|
31 $('#jqxRadioButton4').jqxRadioButton({ theme: theme, width: 250, height: 23 }); |
|
32 $('#jqxRadioButton5').jqxRadioButton({ theme: theme, width: 250, height: 23 }); |
|
33 $('#jqxRadioButton1').on('checked', function(event) { |
|
34 $('#Start').jqxButton({ disabled: false }); |
|
35 choice = 1; |
|
36 }); |
|
37 $('#jqxRadioButton2').on('checked', function(event) { |
|
38 $('#Start').jqxButton({ disabled: false }); |
|
39 choice = 2; |
|
40 }); |
|
41 $('#jqxRadioButton3').on('checked', function(event) { |
|
42 $('#Start').jqxButton({ disabled: false }); |
|
43 choice = 3; |
|
44 }); |
|
45 $('#jqxRadioButton4').on('checked', function(event) { |
|
46 $('#Start').jqxButton({ disabled: false }); |
|
47 choice = 4; |
|
48 }); |
|
49 $('#jqxRadioButton5').on('checked', function(event) { |
|
50 $('#Start').jqxButton({ disabled: false }); |
|
51 choice = 5; |
|
52 }); |
27 |
53 |
28 $("#name").html(my_name); |
54 $('#Start').jqxButton({ template: 'success', width: '100px', theme: theme, disabled: true }); |
29 $("#jqxRadioButton1").jqxRadioButton({ theme: theme, width: 250, height: 23 }); |
55 $('#Start').click(function() { |
30 $("#jqxRadioButton2").jqxRadioButton({ theme: theme, width: 250, height: 23 }); |
56 if (choice == 1) { |
31 $("#jqxRadioButton3").jqxRadioButton({ theme: theme, width: 250, height: 23 }); |
57 window.open('rec_beerxml.php?record=' + my_record); |
32 $("#jqxRadioButton4").jqxRadioButton({ theme: theme, width: 250, height: 23 }); |
58 } else if (choice == 2) { |
33 $("#jqxRadioButton5").jqxRadioButton({ theme: theme, width: 250, height: 23 }); |
59 window.open('rec_duplicate.php?record=' + my_record); |
34 $('#jqxRadioButton1').on('checked', function (event) { |
60 } else if (choice == 3) { |
35 $('#Start').jqxButton({ disabled: false }); |
61 window.open('rec_toproduct.php?record=' + my_record); |
36 choice = 1; |
62 } else if (choice == 4) { |
37 }); |
63 window.open('rec_print.php?record=' + my_record); |
38 $('#jqxRadioButton2').on('checked', function (event) { |
64 } else if (choice == 5) { |
39 $('#Start').jqxButton({ disabled: false }); |
65 window.open('rec_forum.php?record=' + my_record); |
40 choice = 2; |
66 } |
41 }); |
67 // Return to the original recipe |
42 $('#jqxRadioButton3').on('checked', function (event) { |
68 window.location.href = 'rec_edit.php?record=' + my_record + '&return=' + my_return; |
43 $('#Start').jqxButton({ disabled: false }); |
69 }); |
44 choice = 3; |
|
45 }); |
|
46 $('#jqxRadioButton4').on('checked', function (event) { |
|
47 $('#Start').jqxButton({ disabled: false }); |
|
48 choice = 4; |
|
49 }); |
|
50 $('#jqxRadioButton5').on('checked', function (event) { |
|
51 $('#Start').jqxButton({ disabled: false }); |
|
52 choice = 5; |
|
53 }); |
|
54 |
|
55 $('#Start').jqxButton({ template: "success", width: '100px', theme: theme, disabled: true }); |
|
56 $('#Start').click(function () { |
|
57 if (choice == 1) { |
|
58 window.open('rec_beerxml.php?record=' + my_record); |
|
59 } else if (choice == 2) { |
|
60 window.open('rec_duplicate.php?record=' + my_record); |
|
61 } else if (choice == 3) { |
|
62 window.open('rec_toproduct.php?record=' + my_record); |
|
63 } else if (choice == 4) { |
|
64 window.open('rec_print.php?record=' + my_record); |
|
65 } else if (choice == 5) { |
|
66 window.open('rec_forum.php?record=' + my_record); |
|
67 } |
|
68 // Return to the original recipe |
|
69 window.location.href = "rec_edit.php?record=" + my_record + "&return=" + my_return; |
|
70 }); |
|
71 }); |
70 }); |