Thu, 19 Mar 2020 20:41:18 +0100
Fixed some html errors. Added volume calculations for the brewday tab using a popup tool.
302
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
1 | /***************************************************************************** |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2 | * Copyright (C) 2019 |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3 | * |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4 | * Michiel Broek <mbroek at mbse dot eu> |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5 | * |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
6 | * This file is part of BMS |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
7 | * |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
8 | * This is free software; you can redistribute it and/or modify it |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
9 | * under the terms of the GNU General Public License as published by the |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
10 | * Free Software Foundation; either version 2, or (at your option) any |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
11 | * later version. |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
12 | * |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
13 | * BrewCloud is distributed in the hope that it will be useful, but |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
16 | * General Public License for more details. |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
17 | * |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
18 | * You should have received a copy of the GNU General Public License |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
19 | * along with ThermFerm; see the file COPYING. If not, write to the Free |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
20 | * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
21 | *****************************************************************************/ |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
22 | |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
23 | |
524
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
24 | $(document).ready(function() { |
302
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
25 | |
524
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
26 | var choice = 0; |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
27 | $('#name').html(my_name); |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
28 | $('#jqxRadioButton1').jqxRadioButton({ theme: theme, width: 250, height: 23 }); |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
29 | $('#jqxRadioButton2').jqxRadioButton({ theme: theme, width: 250, height: 23 }); |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
30 | $('#jqxRadioButton3').jqxRadioButton({ theme: theme, width: 250, height: 23 }); |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
31 | $('#jqxRadioButton4').jqxRadioButton({ theme: theme, width: 250, height: 23 }); |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
32 | $('#jqxRadioButton5').jqxRadioButton({ theme: theme, width: 250, height: 23 }); |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
33 | $('#jqxRadioButton1').on('checked', function(event) { |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
34 | $('#Start').jqxButton({ disabled: false }); |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
35 | choice = 1; |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
36 | }); |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
37 | $('#jqxRadioButton2').on('checked', function(event) { |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
38 | $('#Start').jqxButton({ disabled: false }); |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
39 | choice = 2; |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
40 | }); |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
41 | $('#jqxRadioButton3').on('checked', function(event) { |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
42 | $('#Start').jqxButton({ disabled: false }); |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
43 | choice = 3; |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
44 | }); |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
45 | $('#jqxRadioButton4').on('checked', function(event) { |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
46 | $('#Start').jqxButton({ disabled: false }); |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
47 | choice = 4; |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
48 | }); |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
49 | $('#jqxRadioButton5').on('checked', function(event) { |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
50 | $('#Start').jqxButton({ disabled: false }); |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
51 | choice = 5; |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
52 | }); |
303 | 53 | |
524
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
54 | $('#Start').jqxButton({ template: 'success', width: '100px', theme: theme, disabled: true }); |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
55 | $('#Start').click(function() { |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
56 | if (choice == 1) { |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
57 | window.open('rec_beerxml.php?record=' + my_record); |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
58 | } else if (choice == 2) { |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
59 | window.open('rec_duplicate.php?record=' + my_record); |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
60 | } else if (choice == 3) { |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
61 | window.open('rec_toproduct.php?record=' + my_record); |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
62 | } else if (choice == 4) { |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
63 | window.open('rec_print.php?record=' + my_record); |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
64 | } else if (choice == 5) { |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
65 | window.open('rec_forum.php?record=' + my_record); |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
66 | } |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
67 | // Return to the original recipe |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
68 | window.location.href = 'rec_edit.php?record=' + my_record + '&return=' + my_return; |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
494
diff
changeset
|
69 | }); |
302
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
70 | }); |