Fri, 28 Dec 2018 23:18:42 +0100
Some pH calculations cane use twice as much loops, probably because we have better float precision then the original pascal code. More variables to prevent html reads. Use predicted mash pH (the grist in demi water) to calculate the pH shift from the tapwater to the target pH. It's better but not right yet. Or it is right and brouwhulp is far off.
27 | 1 | /***************************************************************************** |
2 | * Copyright (C) 2014-2018 | |
3 | * | |
4 | * Michiel Broek <mbroek at mbse dot eu> | |
5 | * | |
6 | * This file is part of BrewCloud | |
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 | function createDelElements() { | |
25 | $('#eventWindow').jqxWindow({ | |
26 | theme: theme, | |
27 | position: { x: 490, y: 210 }, | |
28 | width: 300, | |
34 | 29 | height: 175, |
27 | 30 | resizable: false, |
31 | isModal: true, | |
32 | modalOpacity: 0.4, | |
33 | okButton: $('#delOk'), | |
34 | cancelButton: $('#delCancel'), | |
35 | initContent: function () { | |
117
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
36 | $('#delOk').jqxButton({ template: "danger", width: '65px', theme: theme }); |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
37 | $('#delCancel').jqxButton({ template: "success", width: '65px', theme: theme }); |
27 | 38 | $('#delCancel').focus(); |
39 | } | |
40 | }); | |
41 | $('#eventWindow').jqxWindow('hide'); | |
42 | } | |
43 | ||
44 | ||
45 | $(document).ready(function () { | |
116
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
46 | |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
47 | function calcBatchVolume() { |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
48 | var calc = $("#calc_boil_volume").val(); |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
49 | var boil_size = parseFloat($("#boil_size").jqxNumberInput('decimal')); |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
50 | var evap_rate = parseFloat($("#evap_rate").jqxNumberInput('decimal')); |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
51 | var boil_time = parseFloat($("#boil_time").jqxNumberInput('decimal')); |
117
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
52 | var top_up = parseFloat($("#top_up_kettle").jqxNumberInput('decimal')); |
116
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
53 | |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
54 | if (calc) { // If checked, calculate the batch size. |
117
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
55 | var batch = boil_size - (evap_rate * boil_time / 60) + top_up; |
116
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
56 | $("#batch_size").val(batch); |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
57 | } |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
58 | } |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
59 | |
27 | 60 | var url = "includes/db_inventory_equipments.php"; |
61 | // tooltips | |
62 | $("#name").jqxTooltip({ content: 'The unique name of this brew equipment.' }); | |
63 | $("#notes").jqxTooltip({ content: 'Some notes about the equipment.' }); | |
64 | $("#tun_volume").jqxTooltip({ content: 'Mash TUN volume.' }); | |
65 | $("#tun_height").jqxTooltip({ content: 'Mash TUN height in cm.' }); | |
66 | $("#tun_weight").jqxTooltip({ content: 'Mash TUN weight in Kg.' }); | |
67 | $("#tun_material").jqxTooltip({ content: 'Mash TUN material. Needed to calculate the right strike temperature.' }); | |
149
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
124
diff
changeset
|
68 | $("#mash_volume").jqxTooltip({ content: 'Liters maisch water voor de eerste maisch stap.' }); |
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
124
diff
changeset
|
69 | $("#mash_max").jqxTooltip({ content: 'Maximale moutstort voor deze installatie in Kg.' }); |
27 | 70 | $("#lauter_volume").jqxTooltip({ content: 'Total lauter volume.' }); |
71 | $("#lauter_height").jqxTooltip({ content: 'Height of the lauter TUN in cm.' }); | |
72 | $("#lauter_deadspace").jqxTooltip({ content: 'Volume loss in the lauter TUN.' }); | |
73 | $("#efficiency").jqxTooltip({ content: 'Average efficiency.' }); | |
74 | $("#kettle_volume").jqxTooltip({ content: 'Boil kettle volume in liters.' }); | |
75 | $("#kettle_height").jqxTooltip({ content: 'Boil kettle height in cm.' }); | |
76 | $("#boil_size").jqxTooltip({ content: 'Normal boil volume in liters' }); | |
77 | $("#evap_rate").jqxTooltip({ content: 'Evaporation in liters per hour.' }); | |
78 | $("#boil_time").jqxTooltip({ content: 'Normal boil time in minutes.' }); | |
79 | $("#top_up_kettle").jqxTooltip({ content: 'Extra water added to the boil.' }); | |
80 | $("#hop_utilization").jqxTooltip({ content: '100% for smaller installations, higher for large breweries.' }); | |
81 | $("#batch_size").jqxTooltip({ content: 'Calculated batch size, liters at end of the boil.' }); | |
82 | $("#trub_chiller_loss").jqxTooltip({ content: 'Standard loss in liters during transfer to the fermenter.' }); | |
83 | ||
84 | // prepare the data | |
85 | var source = { | |
86 | datatype: "json", | |
87 | cache: false, | |
88 | datafields: [ | |
89 | { name: 'record', type: 'number' }, | |
90 | { name: 'name', type: 'string' }, | |
91 | { name: 'boil_size', type: 'float' }, | |
92 | { name: 'batch_size', type: 'float' }, | |
93 | { name: 'tun_volume', type: 'float' }, | |
94 | { name: 'tun_weight', type: 'float' }, | |
116
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
95 | { name: 'tun_specific_heat', type: 'float' }, |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
96 | { name: 'tun_material', type: 'string' }, |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
97 | { name: 'tun_height', type: 'float' }, |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
98 | { name: 'top_up_water', type: 'float' }, |
27 | 99 | { name: 'trub_chiller_loss', type: 'float' }, |
100 | { name: 'evap_rate', type: 'float' }, | |
101 | { name: 'boil_time', type: 'float' }, | |
116
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
102 | { name: 'calc_boil_volume', type: 'bool' }, |
27 | 103 | { name: 'top_up_kettle', type: 'float' }, |
104 | { name: 'hop_utilization', type: 'float' }, | |
105 | { name: 'notes', type: 'string' }, | |
106 | { name: 'lauter_volume', type: 'float' }, | |
116
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
107 | { name: 'lauter_height', type: 'float' }, |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
108 | { name: 'lauter_deadspace', type: 'float' }, |
27 | 109 | { name: 'kettle_volume', type: 'float' }, |
110 | { name: 'kettle_height', type: 'float' }, | |
111 | { name: 'mash_volume', type: 'float' }, | |
149
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
124
diff
changeset
|
112 | { name: 'mash_max', type: 'float' }, |
27 | 113 | { name: 'efficiency', type: 'float' } |
114 | ], | |
115 | id: 'record', | |
116 | url: url, | |
117 | deleterow: function (rowid, commit) { | |
118 | // synchronize with the server - send delete command | |
119 | var data = "delete=true&" + $.param({ record: rowid }); | |
120 | $.ajax({ | |
121 | dataType: 'json', | |
122 | url: url, | |
123 | cache: false, | |
124 | data: data, | |
125 | success: function (data, status, xhr) { | |
126 | // delete command is executed. | |
127 | commit(true); | |
128 | }, | |
129 | error: function (jqXHR, textStatus, errorThrown) { | |
130 | commit(false); | |
131 | } | |
132 | }); | |
133 | }, | |
134 | addrow: function (rowid, rowdata, position, commit) { | |
135 | var data = "insert=true&" + $.param(rowdata); | |
136 | $.ajax({ | |
137 | dataType: 'json', | |
138 | url: url, | |
139 | cache: false, | |
140 | data: data, | |
141 | success: function (data, status, xhr) { | |
142 | commit(true); | |
143 | }, | |
144 | error: function(jqXHR, textStatus, errorThrown) { | |
145 | commit(false); | |
146 | } | |
147 | }); | |
148 | }, | |
149 | updaterow: function (rowid, rowdata, commit) { | |
150 | var data = "update=true&" + $.param(rowdata); | |
151 | $.ajax({ | |
152 | dataType: 'json', | |
153 | url: url, | |
154 | cache: false, | |
155 | data: data, | |
156 | success: function (data, status, xhr) { | |
157 | // update command is executed. | |
158 | commit(true); | |
159 | }, | |
160 | error: function(jqXHR, textStatus, errorThrown) { | |
161 | commit(false); | |
162 | } | |
163 | }); | |
164 | } | |
165 | }; | |
124
b5a9eaca766e
Expanded equipment editor to 200 Hl.
Michiel Broek <mbroek@mbse.eu>
parents:
117
diff
changeset
|
166 | |
27 | 167 | // initialize the input fields. |
168 | var srcMaterial= [ "RVS", "Aluminium", "Kunststof", "Koper" ]; | |
169 | ||
170 | $("#name").jqxInput({ theme: theme, width: 250, height: 23 }); | |
124
b5a9eaca766e
Expanded equipment editor to 200 Hl.
Michiel Broek <mbroek@mbse.eu>
parents:
117
diff
changeset
|
171 | $("#boil_size").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 200000, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 }); |
b5a9eaca766e
Expanded equipment editor to 200 Hl.
Michiel Broek <mbroek@mbse.eu>
parents:
117
diff
changeset
|
172 | $("#batch_size").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 200000, decimalDigits: 2, spinButtons: true, spinButtonsStep: 0.5 }); |
b5a9eaca766e
Expanded equipment editor to 200 Hl.
Michiel Broek <mbroek@mbse.eu>
parents:
117
diff
changeset
|
173 | $("#tun_volume").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 200000, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 }); |
149
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
124
diff
changeset
|
174 | $("#tun_weight").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 2, spinButtons: true }); |
117
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
175 | $("#tun_specific_heat").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 3 }); |
116
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
176 | $("#tun_material").jqxDropDownList({ theme: theme, source: srcMaterial, selectedIndex: 0, width: 110, height: 23, dropDownHeight: 130 }); |
149
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
124
diff
changeset
|
177 | $("#tun_height").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
124
b5a9eaca766e
Expanded equipment editor to 200 Hl.
Michiel Broek <mbroek@mbse.eu>
parents:
117
diff
changeset
|
178 | $("#top_up_water").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 20000, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 }); |
b5a9eaca766e
Expanded equipment editor to 200 Hl.
Michiel Broek <mbroek@mbse.eu>
parents:
117
diff
changeset
|
179 | $("#trub_chiller_loss").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 }); |
b5a9eaca766e
Expanded equipment editor to 200 Hl.
Michiel Broek <mbroek@mbse.eu>
parents:
117
diff
changeset
|
180 | $("#evap_rate").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 40000, decimalDigits: 2, spinButtons: true, spinButtonsStep: 0.05 }); |
149
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
124
diff
changeset
|
181 | $("#boil_time").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 1440, decimalDigits: 0, spinButtons: true }); |
116
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
182 | $("#calc_boil_volume").jqxCheckBox({ theme: theme, width: 120, height: 23 }); |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
183 | $("#calc_boil_volume").on('checked', function (event) { |
149
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
124
diff
changeset
|
184 | $("#batch_size").jqxNumberInput({ readOnly: true, width: 90, spinButtons: false }); |
116
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
185 | }); |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
186 | $("#calc_boil_volume").on('unchecked', function (event) { |
149
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
124
diff
changeset
|
187 | $("#batch_size").jqxNumberInput({ readOnly: false, width: 110, spinButtons: true }); |
116
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
188 | }); |
124
b5a9eaca766e
Expanded equipment editor to 200 Hl.
Michiel Broek <mbroek@mbse.eu>
parents:
117
diff
changeset
|
189 | $("#top_up_kettle").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 }); |
116
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
190 | $("#hop_utilization").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 0, spinButtons: true }); |
27 | 191 | $("#notes").jqxInput({ theme: theme, width: 640, height: 100 }); |
124
b5a9eaca766e
Expanded equipment editor to 200 Hl.
Michiel Broek <mbroek@mbse.eu>
parents:
117
diff
changeset
|
192 | $("#lauter_volume").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 200000, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 }); |
b5a9eaca766e
Expanded equipment editor to 200 Hl.
Michiel Broek <mbroek@mbse.eu>
parents:
117
diff
changeset
|
193 | $("#lauter_height").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
b5a9eaca766e
Expanded equipment editor to 200 Hl.
Michiel Broek <mbroek@mbse.eu>
parents:
117
diff
changeset
|
194 | $("#lauter_deadspace").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 }); |
b5a9eaca766e
Expanded equipment editor to 200 Hl.
Michiel Broek <mbroek@mbse.eu>
parents:
117
diff
changeset
|
195 | $("#kettle_volume").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 200000, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 }); |
b5a9eaca766e
Expanded equipment editor to 200 Hl.
Michiel Broek <mbroek@mbse.eu>
parents:
117
diff
changeset
|
196 | $("#kettle_height").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
b5a9eaca766e
Expanded equipment editor to 200 Hl.
Michiel Broek <mbroek@mbse.eu>
parents:
117
diff
changeset
|
197 | $("#mash_volume").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 200000, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 }); |
149
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
124
diff
changeset
|
198 | $("#mash_max").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 200000, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 }); |
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
124
diff
changeset
|
199 | $("#efficiency").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
27 | 200 | var dataAdapter = new $.jqx.dataAdapter(source); |
201 | var editrow = -1; | |
202 | // initialize jqxGrid | |
203 | $("#jqxgrid").jqxGrid({ | |
204 | width: 1280, | |
205 | height: 630, | |
206 | source: dataAdapter, | |
207 | theme: theme, | |
208 | showstatusbar: true, | |
209 | localization: getLocalization(), | |
210 | renderstatusbar: function (statusbar) { | |
211 | var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>"); | |
34 | 212 | var addButton = $("<div style='float: right; margin-right: 15px;'><img style='position: relative; margin-top: 2px;' src='images/add.png'/><span style='margin-left: 4px; position: relative; top: -3px;'>Nieuw</span></div>"); |
27 | 213 | container.append(addButton); |
214 | statusbar.append(container); | |
34 | 215 | addButton.jqxButton({ theme: theme, width: 120, height: 20 }); |
27 | 216 | // add new row. |
217 | addButton.click(function (event) { | |
218 | editrow = -1; | |
34 | 219 | $("#popupWindow").jqxWindow({ position: { x: 180, y: 30 } }); |
27 | 220 | $("#name").val(''); |
221 | $("#boil_size").val('18'); | |
222 | $("#batch_size").val('15.3'); | |
223 | $("#tun_volume").val('20'); | |
224 | $("#tun_weight").val('2'); | |
116
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
225 | $("#tun_specific_heat").val('0.11'); |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
226 | $("#tun_material").val('RVS'); |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
227 | $("#tun_height").val('20'); |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
228 | $("#top_up_water").val('0'); |
27 | 229 | $("#trub_chiller_loss").val('0.5'); |
230 | $("#evap_rate").val('1.8'); | |
231 | $("#boil_time").val('90'); | |
117
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
232 | $("#calc_boil_volume").val(true); |
27 | 233 | $("#top_up_kettle").val('0'); |
234 | $("#hop_utilization").val('100'); | |
235 | $("#notes").val(''); | |
236 | $("#lauter_volume").val('20'); | |
116
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
237 | $("#lauter_height").val('20'); |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
238 | $("#lauter_deadspace").val('0.5'); |
27 | 239 | $("#kettle_volume").val('20'); |
240 | $("#kettle_height").val('20'); | |
241 | $("#mash_volume").val('18'); | |
149
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
124
diff
changeset
|
242 | $("#mash_max").val('6'); |
27 | 243 | $("#efficiency").val('75'); |
244 | $("#popupWindow").jqxWindow('open'); | |
245 | }); | |
246 | }, | |
247 | filterable: true, | |
248 | filtermode: 'excel', | |
116
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
249 | ready: function() { |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
250 | $('#boil_size').on('change', function (event) { calcBatchVolume(); }); |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
251 | $('#evap_rate').on('change', function (event) { calcBatchVolume(); }); |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
252 | $('#boil_time').on('change', function (event) { calcBatchVolume(); }); |
117
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
253 | $('#top_up_kettle').on('change', function (event) { calcBatchVolume(); }); |
116
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
254 | $("#calc_boil_volume").on('change', function (event) { calcBatchVolume(); }); |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
255 | $('#tun_material').on('change', function (event) { |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
256 | switch ($('#tun_material').val()) { |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
257 | case 'RVS': $("#tun_specific_heat").val('0.11'); |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
258 | break; |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
259 | case 'Aluminium': $("#tun_specific_heat").val('0.22'); |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
260 | break; |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
261 | case 'Kunststof': $("#tun_specific_heat").val('0.46'); |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
262 | break; |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
263 | case 'Koper': $("#tun_specific_heat").val('0.092'); |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
264 | break; |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
265 | } |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
266 | }); |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
267 | }, |
27 | 268 | columns: [ |
34 | 269 | { text: 'Installatie naam', datafield: 'name', width: 200 }, |
270 | { text: 'Kook volume', datafield: 'boil_size', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'f1' }, | |
271 | { text: 'Batch volume', datafield: 'batch_size', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'f1' }, | |
272 | { text: 'Opmerkingen', datafield: 'notes' }, | |
273 | { text: 'Wijzig', datafield: 'Edit', width: 120, align: 'center', columntype: 'button', cellsrenderer: function () { | |
274 | return "Wijzig"; | |
27 | 275 | }, buttonclick: function (row) { |
276 | // open the popup window when the user clicks a button. | |
277 | editrow = row; | |
34 | 278 | $("#popupWindow").jqxWindow({ position: { x: 180, y: 30 } }); |
27 | 279 | // get the clicked row's data and initialize the input fields. |
280 | var dataRecord = $("#jqxgrid").jqxGrid('getrowdata', editrow); | |
281 | $("#name").val(dataRecord.name); | |
282 | $("#boil_size").val(dataRecord.boil_size); | |
283 | $("#batch_size").val(dataRecord.batch_size); | |
284 | $("#tun_volume").val(dataRecord.tun_volume); | |
285 | $("#tun_weight").val(dataRecord.tun_weight); | |
116
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
286 | $("#tun_specific_heat").val(dataRecord.tun_specific_heat); |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
287 | $("#tun_material").val(dataRecord.tun_material); |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
288 | $("#tun_height").val(dataRecord.tun_height); |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
289 | $("#top_up_water").val(dataRecord.top_up_water); |
27 | 290 | $("#trub_chiller_loss").val(dataRecord.trub_chiller_loss); |
291 | $("#evap_rate").val(dataRecord.evap_rate); | |
292 | $("#boil_time").val(dataRecord.boil_time); | |
116
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
293 | $("#calc_boil_volume").val(dataRecord.calc_boil_volume); |
27 | 294 | $("#top_up_kettle").val(dataRecord.top_up_kettle); |
295 | $("#hop_utilization").val(dataRecord.hop_utilization); | |
296 | $("#notes").val(dataRecord.notes); | |
297 | $("#lauter_volume").val(dataRecord.lauter_volume); | |
116
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
298 | $("#lauter_height").val(dataRecord.lauter_height); |
ac993ef43b13
Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.
Michiel Broek <mbroek@mbse.eu>
parents:
34
diff
changeset
|
299 | $("#lauter_deadspace").val(dataRecord.lauter_deadspace); |
27 | 300 | $("#kettle_volume").val(dataRecord.kettle_volume); |
301 | $("#kettle_height").val(dataRecord.kettle_height); | |
302 | $("#mash_volume").val(dataRecord.mash_volume); | |
149
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
124
diff
changeset
|
303 | $("#mash_max").val(dataRecord.mash_max); |
27 | 304 | $("#efficiency").val(dataRecord.efficiency); |
305 | // show the popup window. | |
306 | $("#popupWindow").jqxWindow('open'); | |
307 | } | |
308 | } | |
309 | ] | |
310 | }); | |
311 | // initialize the popup window and buttons. | |
312 | $("#popupWindow").jqxWindow({ | |
34 | 313 | width: 900, resizable: false, theme: theme, isModal: true, autoOpen: false, cancelButton: $("#Cancel"), modalOpacity: 0.40 |
27 | 314 | }); |
315 | $("#popupWindow").on('open', function () { | |
316 | $("#name").jqxInput('selectAll'); | |
317 | }); | |
117
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
318 | $("#Delete").jqxButton({ template: "danger", width: '80px', theme: theme }); |
27 | 319 | $("#Delete").click(function () { |
320 | if (editrow >= 0) { | |
321 | // Open a popup to confirm this action. | |
322 | $('#eventWindow').jqxWindow('open'); | |
323 | $("#delOk").click(function () { | |
324 | var rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); | |
325 | $("#jqxgrid").jqxGrid('deleterow', rowID); | |
326 | }); | |
327 | } | |
328 | $("#popupWindow").jqxWindow('hide'); | |
329 | }); | |
117
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
330 | $("#Cancel").jqxButton({ template: "primary", width: '80px', theme: theme }); |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
331 | $("#Save").jqxButton({ template: "success", width: '90px', theme: theme }); |
27 | 332 | // update the edited row when the user clicks the 'Save' button. |
333 | $("#Save").click(function () { | |
117
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
334 | var rowID = -1; |
27 | 335 | if (editrow >= 0) { |
336 | var rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); | |
117
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
337 | } |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
338 | var row = { |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
339 | record: rowID, |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
340 | name: $("#name").val(), |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
341 | boil_size: parseFloat($("#boil_size").jqxNumberInput('decimal')), |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
342 | batch_size: parseFloat($("#batch_size").jqxNumberInput('decimal')), |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
343 | tun_volume: parseFloat($("#tun_volume").jqxNumberInput('decimal')), |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
344 | tun_weight: parseFloat($("#tun_weight").jqxNumberInput('decimal')), |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
345 | tun_specific_heat: parseFloat($("#tun_specific_heat").jqxNumberInput('decimal')), |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
346 | tun_material: $("#tun_material").val(), |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
347 | tun_height: parseFloat($("#tun_height").jqxNumberInput('decimal')), |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
348 | top_up_water: parseFloat($("#top_up_water").jqxNumberInput('decimal')), |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
349 | trub_chiller_loss: parseFloat($("#trub_chiller_loss").jqxNumberInput('decimal')), |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
350 | evap_rate: parseFloat($("#evap_rate").jqxNumberInput('decimal')), |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
351 | boil_time: parseFloat($("#boil_time").jqxNumberInput('decimal')), |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
352 | calc_boil_volume: $("#calc_boil_volume").val(), |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
353 | top_up_kettle: parseFloat($("#top_up_kettle").jqxNumberInput('decimal')), |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
354 | hop_utilization: parseFloat($("#hop_utilization").jqxNumberInput('decimal')), |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
355 | notes: $("#notes").val(), |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
356 | lauter_volume: parseFloat($("#lauter_volume").jqxNumberInput('decimal')), |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
357 | lauter_height: parseFloat($("#lauter_height").jqxNumberInput('decimal')), |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
358 | lauter_deadspace: parseFloat($("#lauter_deadspace").jqxNumberInput('decimal')), |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
359 | kettle_volume: parseFloat($("#kettle_volume").jqxNumberInput('decimal')), |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
360 | kettle_height: parseFloat($("#kettle_height").jqxNumberInput('decimal')), |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
361 | mash_volume: parseFloat($("#mash_volume").jqxNumberInput('decimal')), |
149
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
124
diff
changeset
|
362 | mash_max: parseFloat($("#mash_max").jqxNumberInput('decimal')), |
117
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
363 | efficiency: parseFloat($("#efficiency").jqxNumberInput('decimal')) |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
364 | }; |
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
365 | if (editrow >= 0) { |
27 | 366 | $('#jqxgrid').jqxGrid('updaterow', rowID, row); |
367 | } else { | |
117
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
368 | $('#jqxgrid').jqxGrid('addrow', null, row); |
27 | 369 | } |
117
9e378e37f20f
Inventory editor chages: Added colors to the buttons. Add top_up_kettle to the batch size calculation.
Michiel Broek <mbroek@mbse.eu>
parents:
116
diff
changeset
|
370 | $("#popupWindow").jqxWindow('hide'); |
27 | 371 | }); |
372 | createDelElements(); | |
373 | }); | |
374 |