1 /***************************************************************************** |
|
2 * Copyright (C) 2019 |
|
3 * |
|
4 * Michiel Broek <mbroek at mbse dot eu> |
|
5 * |
|
6 * This file is part of BMS |
|
7 * |
|
8 * This is free software; you can redistribute it and/or modify it |
|
9 * under the terms of the GNU General Public License as published by the |
|
10 * Free Software Foundation; either version 2, or (at your option) any |
|
11 * later version. |
|
12 * |
|
13 * BrewCloud is distributed in the hope that it will be useful, but |
|
14 * WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
16 * General Public License for more details. |
|
17 * |
|
18 * You should have received a copy of the GNU General Public License |
|
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. |
|
21 *****************************************************************************/ |
|
22 |
|
23 |
|
24 $(document).ready(function() { |
|
25 |
|
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 }); |
|
53 |
|
54 $('#Start').jqxButton({ template: 'success', width: '100px', theme: theme, disabled: true }); |
|
55 $('#Start').click(function() { |
|
56 if (choice == 1) { |
|
57 window.open('rec_beerxml.php?record=' + my_record); |
|
58 } else if (choice == 2) { |
|
59 window.open('rec_duplicate.php?record=' + my_record); |
|
60 } else if (choice == 3) { |
|
61 window.open('rec_toproduct.php?record=' + my_record); |
|
62 } else if (choice == 4) { |
|
63 window.open('rec_print.php?record=' + my_record); |
|
64 } else if (choice == 5) { |
|
65 window.open('rec_forum.php?record=' + my_record); |
|
66 } |
|
67 // Return to the original recipe |
|
68 window.location.href = 'rec_edit.php?record=' + my_record + '&return=' + my_return; |
|
69 }); |
|
70 }); |
|