|
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 |
|
28 $("#name").html(my_name); |
|
29 $("#code").html(my_code); |
|
30 $("#jqxRadioButton1").jqxRadioButton({ theme: theme, width: 250, height: 23 }); |
|
31 $("#jqxRadioButton2").jqxRadioButton({ theme: theme, width: 250, height: 23 }); |
|
32 $("#jqxRadioButton3").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 |
|
46 $('#Start').jqxButton({ template: "success", width: '100px', theme: theme, disabled: true }); |
|
47 $('#Start').click(function () { |
|
48 if (choice == 1) { |
|
49 var url="prod_beerxml.php?record=" + my_record; |
|
50 window.open(url); |
|
51 } else if (choice == 2) { |
|
52 var url="prod_duplicate.php?record=" + my_record; |
|
53 window.open(url); |
|
54 } else if (choice == 3) { |
|
55 var url="prod_torecipe.php?record=" + my_record; |
|
56 window.open(url); |
|
57 } |
|
58 // Return to the original product |
|
59 window.location.href = my_return + "?record=" + my_record; |
|
60 }); |
|
61 |
|
62 }); |