www/js/prod_export.js

changeset 525
8bbc5730aaa8
parent 498
10c6eeee60ce
equal deleted inserted replaced
524:55a246085522 525:8bbc5730aaa8
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 27
28 $("#name").html(my_name); 28 $('#name').html(my_name);
29 $("#code").html(my_code); 29 $('#code').html(my_code);
30 $("#jqxRadioButton1").jqxRadioButton({ theme: theme, width: 250, height: 23 }); 30 $('#jqxRadioButton1').jqxRadioButton({ theme: theme, width: 250, height: 23 });
31 $("#jqxRadioButton2").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 }); 32 $('#jqxRadioButton3').jqxRadioButton({ theme: theme, width: 250, height: 23 });
33 $("#jqxRadioButton4").jqxRadioButton({ theme: theme, width: 250, height: 23 }); 33 $('#jqxRadioButton4').jqxRadioButton({ theme: theme, width: 250, height: 23 });
34 $("#jqxRadioButton5").jqxRadioButton({ theme: theme, width: 250, height: 23 }); 34 $('#jqxRadioButton5').jqxRadioButton({ theme: theme, width: 250, height: 23 });
35 $("#jqxRadioButton6").jqxRadioButton({ theme: theme, width: 250, height: 23 }); 35 $('#jqxRadioButton6').jqxRadioButton({ theme: theme, width: 250, height: 23 });
36 $("#jqxRadioButton7").jqxRadioButton({ theme: theme, width: 250, height: 23 }); 36 $('#jqxRadioButton7').jqxRadioButton({ theme: theme, width: 250, height: 23 });
37 if ((my_split != 0) || (my_stage >= 6)) { 37 if ((my_split != 0) || (my_stage >= 6)) {
38 $("#jqxRadioButton3").jqxRadioButton({ disabled: true }); 38 $('#jqxRadioButton3').jqxRadioButton({ disabled: true });
39 document.getElementById("pmpt3").style.color = "red"; 39 document.getElementById('pmpt3').style.color = 'red';
40 } 40 }
41 41
42 $('#jqxRadioButton1').on('checked', function (event) { 42 $('#jqxRadioButton1').on('checked', function(event) {
43 $('#Start').jqxButton({ disabled: false }); 43 $('#Start').jqxButton({ disabled: false });
44 choice = 1; 44 choice = 1;
45 }); 45 });
46 $('#jqxRadioButton2').on('checked', function (event) { 46 $('#jqxRadioButton2').on('checked', function(event) {
47 $('#Start').jqxButton({ disabled: false }); 47 $('#Start').jqxButton({ disabled: false });
48 choice = 2; 48 choice = 2;
49 }); 49 });
50 $('#jqxRadioButton3').on('checked', function (event) { 50 $('#jqxRadioButton3').on('checked', function(event) {
51 $('#Start').jqxButton({ disabled: false }); 51 $('#Start').jqxButton({ disabled: false });
52 choice = 3; 52 choice = 3;
53 }); 53 });
54 $('#jqxRadioButton4').on('checked', function (event) { 54 $('#jqxRadioButton4').on('checked', function(event) {
55 $('#Start').jqxButton({ disabled: false }); 55 $('#Start').jqxButton({ disabled: false });
56 choice = 4; 56 choice = 4;
57 }); 57 });
58 $('#jqxRadioButton5').on('checked', function (event) { 58 $('#jqxRadioButton5').on('checked', function(event) {
59 $('#Start').jqxButton({ disabled: false }); 59 $('#Start').jqxButton({ disabled: false });
60 choice = 5; 60 choice = 5;
61 }); 61 });
62 $('#jqxRadioButton6').on('checked', function (event) { 62 $('#jqxRadioButton6').on('checked', function(event) {
63 $('#Start').jqxButton({ disabled: false }); 63 $('#Start').jqxButton({ disabled: false });
64 choice = 6; 64 choice = 6;
65 }); 65 });
66 $('#jqxRadioButton7').on('checked', function (event) { 66 $('#jqxRadioButton7').on('checked', function(event) {
67 $('#Start').jqxButton({ disabled: false }); 67 $('#Start').jqxButton({ disabled: false });
68 choice = 7; 68 choice = 7;
69 }); 69 });
70 70
71 $('#Start').jqxButton({ template: "success", width: '100px', theme: theme, disabled: true }); 71 $('#Start').jqxButton({ template: 'success', width: '100px', theme: theme, disabled: true });
72 $('#Start').click(function () { 72 $('#Start').click(function() {
73 if (choice == 1) { 73 if (choice == 1) {
74 window.open('prod_beerxml.php?record=' + my_record); 74 window.open('prod_beerxml.php?record=' + my_record);
75 } else if (choice == 2) { 75 } else if (choice == 2) {
76 window.open('prod_duplicate.php?record=' + my_record); 76 window.open('prod_duplicate.php?record=' + my_record);
77 } else if (choice == 3) { 77 } else if (choice == 3) {
78 window.location.href = 'prod_divide.php?record=' + my_record + '&return=' + my_return; 78 window.location.href = 'prod_divide.php?record=' + my_record + '&return=' + my_return;
79 } else if (choice == 4) { 79 } else if (choice == 4) {
80 window.open('prod_torecipe.php?record=' + my_record); 80 window.open('prod_torecipe.php?record=' + my_record);
81 } else if (choice == 5) { 81 } else if (choice == 5) {
82 window.open('prod_print.php?record=' + my_record); 82 window.open('prod_print.php?record=' + my_record);
83 } else if (choice == 6) { 83 } else if (choice == 6) {
84 window.open('prod_checklist.php?record=' + my_record); 84 window.open('prod_checklist.php?record=' + my_record);
85 } else if (choice == 7) { 85 } else if (choice == 7) {
86 window.open('prod_forum.php?record=' + my_record); 86 window.open('prod_forum.php?record=' + my_record);
87 } 87 }
88 // Return to the original product 88 // Return to the original product
89 if (choice != 3) 89 if (choice != 3)
90 window.location.href = "prod_edit.php?record=" + my_record + "&return=" + my_return; 90 window.location.href = 'prod_edit.php?record=' + my_record + '&return=' + my_return;
91 }); 91 });
92 92
93 }); 93 });

mercurial