Thu, 13 Dec 2018 20:32:36 +0100
Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
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.' }); | |
68 | $("#mash_volume").jqxTooltip({ content: 'Mash water for the first step.' }); | |
69 | $("#lauter_volume").jqxTooltip({ content: 'Total lauter volume.' }); | |
70 | $("#lauter_height").jqxTooltip({ content: 'Height of the lauter TUN in cm.' }); | |
71 | $("#lauter_deadspace").jqxTooltip({ content: 'Volume loss in the lauter TUN.' }); | |
72 | $("#efficiency").jqxTooltip({ content: 'Average efficiency.' }); | |
73 | $("#kettle_volume").jqxTooltip({ content: 'Boil kettle volume in liters.' }); | |
74 | $("#kettle_height").jqxTooltip({ content: 'Boil kettle height in cm.' }); | |
75 | $("#boil_size").jqxTooltip({ content: 'Normal boil volume in liters' }); | |
76 | $("#evap_rate").jqxTooltip({ content: 'Evaporation in liters per hour.' }); | |
77 | $("#boil_time").jqxTooltip({ content: 'Normal boil time in minutes.' }); | |
78 | $("#top_up_kettle").jqxTooltip({ content: 'Extra water added to the boil.' }); | |
79 | $("#hop_utilization").jqxTooltip({ content: '100% for smaller installations, higher for large breweries.' }); | |
80 | $("#batch_size").jqxTooltip({ content: 'Calculated batch size, liters at end of the boil.' }); | |
81 | $("#trub_chiller_loss").jqxTooltip({ content: 'Standard loss in liters during transfer to the fermenter.' }); | |
82 | ||
83 | // prepare the data | |
84 | var source = { | |
85 | datatype: "json", | |
86 | cache: false, | |
87 | datafields: [ | |
88 | { name: 'record', type: 'number' }, | |
89 | { name: 'name', type: 'string' }, | |
90 | { name: 'boil_size', type: 'float' }, | |
91 | { name: 'batch_size', type: 'float' }, | |
92 | { name: 'tun_volume', type: 'float' }, | |
93 | { 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
|
94 | { 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
|
95 | { 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
|
96 | { 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
|
97 | { name: 'top_up_water', type: 'float' }, |
27 | 98 | { name: 'trub_chiller_loss', type: 'float' }, |
99 | { name: 'evap_rate', type: 'float' }, | |
100 | { 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
|
101 | { name: 'calc_boil_volume', type: 'bool' }, |
27 | 102 | { name: 'top_up_kettle', type: 'float' }, |
103 | { name: 'hop_utilization', type: 'float' }, | |
104 | { name: 'notes', type: 'string' }, | |
105 | { 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
|
106 | { 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
|
107 | { name: 'lauter_deadspace', type: 'float' }, |
27 | 108 | { name: 'kettle_volume', type: 'float' }, |
109 | { name: 'kettle_height', type: 'float' }, | |
110 | { name: 'mash_volume', type: 'float' }, | |
111 | { name: 'efficiency', type: 'float' } | |
112 | ], | |
113 | id: 'record', | |
114 | url: url, | |
115 | deleterow: function (rowid, commit) { | |
116 | // synchronize with the server - send delete command | |
117 | var data = "delete=true&" + $.param({ record: rowid }); | |
118 | $.ajax({ | |
119 | dataType: 'json', | |
120 | url: url, | |
121 | cache: false, | |
122 | data: data, | |
123 | success: function (data, status, xhr) { | |
124 | // delete command is executed. | |
125 | commit(true); | |
126 | }, | |
127 | error: function (jqXHR, textStatus, errorThrown) { | |
128 | commit(false); | |
129 | } | |
130 | }); | |
131 | }, | |
132 | addrow: function (rowid, rowdata, position, commit) { | |
133 | var data = "insert=true&" + $.param(rowdata); | |
134 | $.ajax({ | |
135 | dataType: 'json', | |
136 | url: url, | |
137 | cache: false, | |
138 | data: data, | |
139 | success: function (data, status, xhr) { | |
140 | commit(true); | |
141 | }, | |
142 | error: function(jqXHR, textStatus, errorThrown) { | |
143 | commit(false); | |
144 | } | |
145 | }); | |
146 | }, | |
147 | updaterow: function (rowid, rowdata, commit) { | |
148 | var data = "update=true&" + $.param(rowdata); | |
149 | $.ajax({ | |
150 | dataType: 'json', | |
151 | url: url, | |
152 | cache: false, | |
153 | data: data, | |
154 | success: function (data, status, xhr) { | |
155 | // update command is executed. | |
156 | commit(true); | |
157 | }, | |
158 | error: function(jqXHR, textStatus, errorThrown) { | |
159 | commit(false); | |
160 | } | |
161 | }); | |
162 | } | |
163 | }; | |
124
b5a9eaca766e
Expanded equipment editor to 200 Hl.
Michiel Broek <mbroek@mbse.eu>
parents:
117
diff
changeset
|
164 | |
27 | 165 | // initialize the input fields. |
166 | var srcMaterial= [ "RVS", "Aluminium", "Kunststof", "Koper" ]; | |
167 | ||
168 | $("#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
|
169 | $("#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
|
170 | $("#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
|
171 | $("#tun_volume").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 200000, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 }); |
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
|
172 | $("#tun_weight").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, 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
|
173 | $("#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
|
174 | $("#tun_material").jqxDropDownList({ theme: theme, source: srcMaterial, selectedIndex: 0, width: 110, height: 23, dropDownHeight: 130 }); |
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
|
175 | $("#tun_height").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, 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
|
176 | $("#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
|
177 | $("#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
|
178 | $("#evap_rate").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 40000, decimalDigits: 2, spinButtons: true, spinButtonsStep: 0.05 }); |
b5a9eaca766e
Expanded equipment editor to 200 Hl.
Michiel Broek <mbroek@mbse.eu>
parents:
117
diff
changeset
|
179 | $("#boil_time").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, 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
|
180 | $("#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
|
181 | $("#calc_boil_volume").on('checked', 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
|
182 | $("#batch_size").jqxNumberInput({ readOnly: true, width: 70, spinButtons: false }); |
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 | }); |
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
|
184 | $("#calc_boil_volume").on('unchecked', 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
|
185 | $("#batch_size").jqxNumberInput({ readOnly: false, width: 90, spinButtons: true }); |
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 | }); |
124
b5a9eaca766e
Expanded equipment editor to 200 Hl.
Michiel Broek <mbroek@mbse.eu>
parents:
117
diff
changeset
|
187 | $("#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
|
188 | $("#hop_utilization").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 0, spinButtons: true }); |
27 | 189 | $("#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
|
190 | $("#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
|
191 | $("#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
|
192 | $("#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
|
193 | $("#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
|
194 | $("#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
|
195 | $("#mash_volume").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 200000, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 }); |
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
|
196 | $("#efficiency").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
27 | 197 | var dataAdapter = new $.jqx.dataAdapter(source); |
198 | var editrow = -1; | |
199 | // initialize jqxGrid | |
200 | $("#jqxgrid").jqxGrid({ | |
201 | width: 1280, | |
202 | height: 630, | |
203 | source: dataAdapter, | |
204 | theme: theme, | |
205 | showstatusbar: true, | |
206 | localization: getLocalization(), | |
207 | renderstatusbar: function (statusbar) { | |
208 | var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>"); | |
34 | 209 | 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 | 210 | container.append(addButton); |
211 | statusbar.append(container); | |
34 | 212 | addButton.jqxButton({ theme: theme, width: 120, height: 20 }); |
27 | 213 | // add new row. |
214 | addButton.click(function (event) { | |
215 | editrow = -1; | |
34 | 216 | $("#popupWindow").jqxWindow({ position: { x: 180, y: 30 } }); |
27 | 217 | $("#name").val(''); |
218 | $("#boil_size").val('18'); | |
219 | $("#batch_size").val('15.3'); | |
220 | $("#tun_volume").val('20'); | |
221 | $("#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
|
222 | $("#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
|
223 | $("#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
|
224 | $("#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
|
225 | $("#top_up_water").val('0'); |
27 | 226 | $("#trub_chiller_loss").val('0.5'); |
227 | $("#evap_rate").val('1.8'); | |
228 | $("#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
|
229 | $("#calc_boil_volume").val(true); |
27 | 230 | $("#top_up_kettle").val('0'); |
231 | $("#hop_utilization").val('100'); | |
232 | $("#notes").val(''); | |
233 | $("#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
|
234 | $("#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
|
235 | $("#lauter_deadspace").val('0.5'); |
27 | 236 | $("#kettle_volume").val('20'); |
237 | $("#kettle_height").val('20'); | |
238 | $("#mash_volume").val('18'); | |
239 | $("#efficiency").val('75'); | |
240 | $("#popupWindow").jqxWindow('open'); | |
241 | }); | |
242 | }, | |
243 | filterable: true, | |
244 | 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
|
245 | 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
|
246 | $('#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
|
247 | $('#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
|
248 | $('#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
|
249 | $('#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
|
250 | $("#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
|
251 | $('#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
|
252 | 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
|
253 | 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
|
254 | 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
|
255 | 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
|
256 | 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
|
257 | 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
|
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 '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
|
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 | } |
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 | }); |
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 | }, |
27 | 264 | columns: [ |
34 | 265 | { text: 'Installatie naam', datafield: 'name', width: 200 }, |
266 | { text: 'Kook volume', datafield: 'boil_size', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'f1' }, | |
267 | { text: 'Batch volume', datafield: 'batch_size', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'f1' }, | |
268 | { text: 'Opmerkingen', datafield: 'notes' }, | |
269 | { text: 'Wijzig', datafield: 'Edit', width: 120, align: 'center', columntype: 'button', cellsrenderer: function () { | |
270 | return "Wijzig"; | |
27 | 271 | }, buttonclick: function (row) { |
272 | // open the popup window when the user clicks a button. | |
273 | editrow = row; | |
34 | 274 | $("#popupWindow").jqxWindow({ position: { x: 180, y: 30 } }); |
27 | 275 | // get the clicked row's data and initialize the input fields. |
276 | var dataRecord = $("#jqxgrid").jqxGrid('getrowdata', editrow); | |
277 | $("#name").val(dataRecord.name); | |
278 | $("#boil_size").val(dataRecord.boil_size); | |
279 | $("#batch_size").val(dataRecord.batch_size); | |
280 | $("#tun_volume").val(dataRecord.tun_volume); | |
281 | $("#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
|
282 | $("#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
|
283 | $("#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
|
284 | $("#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
|
285 | $("#top_up_water").val(dataRecord.top_up_water); |
27 | 286 | $("#trub_chiller_loss").val(dataRecord.trub_chiller_loss); |
287 | $("#evap_rate").val(dataRecord.evap_rate); | |
288 | $("#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
|
289 | $("#calc_boil_volume").val(dataRecord.calc_boil_volume); |
27 | 290 | $("#top_up_kettle").val(dataRecord.top_up_kettle); |
291 | $("#hop_utilization").val(dataRecord.hop_utilization); | |
292 | $("#notes").val(dataRecord.notes); | |
293 | $("#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
|
294 | $("#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
|
295 | $("#lauter_deadspace").val(dataRecord.lauter_deadspace); |
27 | 296 | $("#kettle_volume").val(dataRecord.kettle_volume); |
297 | $("#kettle_height").val(dataRecord.kettle_height); | |
298 | $("#mash_volume").val(dataRecord.mash_volume); | |
299 | $("#efficiency").val(dataRecord.efficiency); | |
300 | // show the popup window. | |
301 | $("#popupWindow").jqxWindow('open'); | |
302 | } | |
303 | } | |
304 | ] | |
305 | }); | |
306 | // initialize the popup window and buttons. | |
307 | $("#popupWindow").jqxWindow({ | |
34 | 308 | width: 900, resizable: false, theme: theme, isModal: true, autoOpen: false, cancelButton: $("#Cancel"), modalOpacity: 0.40 |
27 | 309 | }); |
310 | $("#popupWindow").on('open', function () { | |
311 | $("#name").jqxInput('selectAll'); | |
312 | }); | |
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
|
313 | $("#Delete").jqxButton({ template: "danger", width: '80px', theme: theme }); |
27 | 314 | $("#Delete").click(function () { |
315 | if (editrow >= 0) { | |
316 | // Open a popup to confirm this action. | |
317 | $('#eventWindow').jqxWindow('open'); | |
318 | $("#delOk").click(function () { | |
319 | var rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); | |
320 | $("#jqxgrid").jqxGrid('deleterow', rowID); | |
321 | }); | |
322 | } | |
323 | $("#popupWindow").jqxWindow('hide'); | |
324 | }); | |
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
|
325 | $("#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
|
326 | $("#Save").jqxButton({ template: "success", width: '90px', theme: theme }); |
27 | 327 | // update the edited row when the user clicks the 'Save' button. |
328 | $("#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
|
329 | var rowID = -1; |
27 | 330 | if (editrow >= 0) { |
331 | 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
|
332 | } |
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
|
333 | 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
|
334 | 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
|
335 | 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
|
336 | 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
|
337 | 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
|
338 | 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
|
339 | 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
|
340 | 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
|
341 | 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
|
342 | 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
|
343 | 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
|
344 | 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
|
345 | 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
|
346 | 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
|
347 | 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
|
348 | 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
|
349 | 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
|
350 | 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
|
351 | 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
|
352 | 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
|
353 | 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
|
354 | 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
|
355 | 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
|
356 | mash_volume: parseFloat($("#mash_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 | 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
|
358 | }; |
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 | if (editrow >= 0) { |
27 | 360 | $('#jqxgrid').jqxGrid('updaterow', rowID, row); |
361 | } 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
|
362 | $('#jqxgrid').jqxGrid('addrow', null, row); |
27 | 363 | } |
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
|
364 | $("#popupWindow").jqxWindow('hide'); |
27 | 365 | }); |
366 | createDelElements(); | |
367 | }); | |
368 |