www/js/rec_edit.js

changeset 261
8d55ca45c29e
parent 254
3d61397fe9cd
child 262
36cf32fcd210
equal deleted inserted replaced
260:042fc9b3717b 261:8d55ca45c29e
44 44
45 $(document).ready(function () { 45 $(document).ready(function () {
46 46
47 var to_100 = false; // Fermentables adjust to 100% 47 var to_100 = false; // Fermentables adjust to 100%
48 var preboil_sg = 0; 48 var preboil_sg = 0;
49 var sugarsm = 0; // Sugars after mash 49 // var sugarsm = 0; // Sugars after mash
50 var sugarsf = 0; // Sugars after boil 50 // var sugarsf = 0; // Sugars after boil
51 var psugar = 0; // Percentage real sugars 51 var psugar = 0; // Percentage real sugars
52 var pcara = 0; // Percentage cara/crystal malts 52 var pcara = 0; // Percentage cara/crystal malts
53 var svg = 77; // Default attenuation 53 var svg = 77; // Default attenuation
54 var mashkg = 0; // Malt in mash weight 54 var mashkg = 0; // Malt in mash weight
55 var hop_flavour = 0; 55 var hop_flavour = 0;
154 $("#sparge_acid_perc").jqxNumberInput({ spinButtons: rw, readOnly: ro, width: w100 }); 154 $("#sparge_acid_perc").jqxNumberInput({ spinButtons: rw, readOnly: ro, width: w100 });
155 }; 155 };
156 156
157 function calcFermentables() { 157 function calcFermentables() {
158 console.log("calcFermentables()"); 158 console.log("calcFermentables()");
159 sugarsf = 0; 159 sugarsf = 0; // fermentable sugars mash + boil
160 sugarsm = 0; 160 sugarsm = 0; // fermentable sugars in mash
161 psugar = 0; 161 psugar = 0;
162 pcara = 0; 162 pcara = 0;
163 mashkg = 0; 163 mashkg = 0;
164 var colorw = 0; // Colors working 164 var vol = 0; // Volume sugars after boil
165 var addedS = 0; // Added sugars after boil
166 var addedmass = 0; // Added mass after boil
167 var mvol = 0; // mash volume
168 var colort = 0; // Colors srm * vol totals
165 var my_100 = false; 169 var my_100 = false;
166 170 var mashtime = 0; // Total mash time
167 var rows = $('#fermentableGrid').jqxGrid('getrows'); 171 var mashtemp = 0; // Average mash temperature
172
173 if ((rows = $('#mashGrid').jqxGrid('getrows'))) {
174 for (var i = 0; i < rows.length; i++) {
175 var row = rows[i];
176 if (row.step_type == 0) // Infusion
177 mvol += parseFloat(row.step_infuse_amount);
178 if (row.step_temp <= 75) { // Ignore mashout
179 mashtime += row.step_time;
180 mashtemp += row.step_time * row.step_temp;
181 }
182 }
183 mashtemp = mashtemp / mashtime;
184 }
185
186 if (!(rows = $('#fermentableGrid').jqxGrid('getrows'))) {
187 return; // grid not yet loaded.
188 }
189
190 var s = 0;
168 for (var i = 0; i < rows.length; i++) { 191 for (var i = 0; i < rows.length; i++) {
169 var row = rows[i]; 192 var row = rows[i];
170 if (row.f_adjust_to_total_100) 193 if (row.f_adjust_to_total_100)
171 my_100 = true; 194 my_100 = true;
172 if (row.f_type == 1) // Sugar 195 if (row.f_type == 1) // Sugar
173 psugar += row.f_percentage; 196 psugar += row.f_percentage;
174 if (row.f_graintype == 2) // Crystal 197 if (row.f_graintype == 2) // Crystal
175 pcara += row.f_percentage; 198 pcara += row.f_percentage;
176 var d = row.f_amount * (row.f_yield / 100) * (1 - row.f_moisture / 100); 199 var d = row.f_amount * (row.f_yield / 100) * (1 - row.f_moisture / 100);
177 if (row.f_added == 0) { // Mash 200 if (row.f_added == 0) { // Mash
201 if (mvol > 0) { // Only if mash already known
202 mvol += row.f_amount * row.f_moisture / 100;
203 s += d;
204 }
178 d = parseFloat(dataRecord.efficiency) / 100 * d; 205 d = parseFloat(dataRecord.efficiency) / 100 * d;
179 sugarsm += d; 206 sugarsm += d;
180 mashkg += row.f_amount; 207 mashkg += row.f_amount;
181 } 208 }
182 sugarsf += d; 209 if (row.f_added == 0 || row.f_added == 1) // Mash or Boil
183 colorw += row.f_amount * ebc_to_srm(row.f_color) / parseFloat(dataRecord.batch_size) * 8.34436; 210 sugarsf += d;
211 if (row.f_added == 2 || row.f_added == 3) {
212 var x = (row.f_yield / 100) * (1 - row.f_moisture / 100);
213 addedS += row.f_amount * x;
214 addedmass += row.f_amount;
215 vol += (x * sugardensity + (1 - x) * 1) * row.f_amount;
216 }
217 colort += row.f_amount * ebc_to_srm(row.f_color);
184 } 218 }
185 to_100 = my_100; 219 to_100 = my_100;
186 if (to_100) { 220 if (to_100) {
187 $("#wf_amount").jqxNumberInput({ width: 90, readOnly: true, spinButtons: false }); 221 $("#wf_amount").jqxNumberInput({ width: 90, readOnly: true, spinButtons: false });
188 } else { 222 } else {
189 $("#wf_amount").jqxNumberInput({ width: 110, readOnly: false, spinButtons: true }); 223 $("#wf_amount").jqxNumberInput({ width: 110, readOnly: false, spinButtons: true });
190 } 224 }
191 var est_og = estimate_sg(sugarsf, parseFloat(dataRecord.batch_size)); 225
192 $('#est_og').val(est_og); 226 // Estimate total recipe OG.
193 $('#est_og2').val(est_og); 227 dataRecord.est_og = estimate_sg(sugarsf + addedS, parseFloat(dataRecord.batch_size));
194 preboil_sg = estimate_sg(sugarsm, dataRecord.boil_size); 228 $('#est_og').val(dataRecord.est_og);
195 var color = kw_to_ebc(dataRecord.color_method, colorw); 229 $('#est_og2').val(dataRecord.est_og);
230
231 // Estimate SG in kettle before boil
232 preboil_sg = estimate_sg(sugarsm, parseFloat(dataRecord.boil_size));
233
234 // Color of the wort
235 var cw = colort / parseFloat(dataRecord.batch_size) * 8.34436;
236 var color = kw_to_ebc(dataRecord.color_method, cw);
237 dataRecord.est_color = color;
196 $('#est_color').val(color); 238 $('#est_color').val(color);
197 $('#est_color2').val(color); 239 $('#est_color2').val(color);
198 var scolor = ebc_to_color(color); 240 var scolor = ebc_to_color(color);
199 document.getElementById("bcolor").style.background= scolor; 241 document.getElementById("bcolor").style.background= scolor;
200 document.getElementById("bcolor2").style.background= scolor; 242 document.getElementById("bcolor2").style.background= scolor;
201 // Use boil_size instead of mash_max from equipment. 243
244 // Progress bars
202 pmalts = mashkg / (dataRecord.boil_size / 3) * 100; 245 pmalts = mashkg / (dataRecord.boil_size / 3) * 100;
203 $("#perc_malts").jqxProgressBar('val', pmalts); 246 $("#perc_malts").jqxProgressBar('val', pmalts);
204 $("#perc_sugars").jqxProgressBar('val', psugar); 247 $("#perc_sugars").jqxProgressBar('val', psugar);
205 $("#perc_cara").jqxProgressBar('val', pcara); 248 $("#perc_cara").jqxProgressBar('val', pcara);
249
250 // Calculate estimated svg.
251 svg = 0; // default.
252 var rows = $('#yeastGrid').jqxGrid('getrows');
253 for (var i = 0; i < rows.length; i++) {
254 var row = rows[i];
255 if (row.y_use == 0) { // Primary
256 if (parseFloat(row.y_attenuation) > svg)
257 svg = parseFloat(row.y_attenuation); // Take the highest if multiple yeasts.
258 }
259 // TODO: brett in secondary ??
260 }
261 if (svg == 0)
262 svg = 77;
263
264 if ((mashkg > 0) && (mash_infuse > 0) && (mashtime > 0) && (mashtemp > 0)) {
265 dataRecord.est_fg = estimate_fg(psugar, pcara, mash_infuse / mashkg, mashtime, mashtemp, svg, dataRecord.est_og);
266 } else {
267 dataRecord.est_fg = estimate_fg(psugar, pcara, 0, 0, 0, svg, dataRecord.est_og);
268 }
269 $('#est_fg').val(dataRecord.est_fg);
270 $('#est_fg2').val(dataRecord.est_fg);
271
272 dataRecord.est_abv = abvol(dataRecord.est_og, dataRecord.est_fg);
273 $("#est_abv").val(dataRecord.est_abv);
274 $("#est_abv2").val(dataRecord.est_abv);
206 }; 275 };
207 276
208 function hopFlavourContribution(bt, vol, use, amount) { 277 function hopFlavourContribution(bt, vol, use, amount) {
209 var result; 278 var result;
210 279
262 $('#est_ibu').val(total_ibus); 331 $('#est_ibu').val(total_ibus);
263 $('#est_ibu2').val(total_ibus); 332 $('#est_ibu2').val(total_ibus);
264 $("#hop_flavour").jqxProgressBar('val', hop_flavour * 10); 333 $("#hop_flavour").jqxProgressBar('val', hop_flavour * 10);
265 $("#hop_aroma").jqxProgressBar('val', hop_aroma * 10); 334 $("#hop_aroma").jqxProgressBar('val', hop_aroma * 10);
266 }; 335 };
267
268 function calcSVG() {
269 var rows = $('#yeastGrid').jqxGrid('getrows');
270 for (var i = 0; i < rows.length; i++) {
271 var row = rows[i];
272 if (row.y_use == 0) // Primary
273 svg = parseFloat(row.y_attenuation);
274 }
275 }
276 336
277 /* function GetBUGUMin() { 337 /* function GetBUGUMin() {
278 338
279 var Result = 0; 339 var Result = 0;
280 340
1018 $("#fermentableGrid").jqxGrid('setcellvalue', i, "f_amount", amount); 1078 $("#fermentableGrid").jqxGrid('setcellvalue', i, "f_amount", amount);
1019 } 1079 }
1020 } 1080 }
1021 }; 1081 };
1022 1082
1023 function calcFG() {
1024 var fg = estimate_fg(psugar, pcara, 0, 0, 0, svg, parseFloat(parseFloat($("#est_og").jqxNumberInput('decimal'))));
1025 dataRecord.est_fg = fg;
1026 $('#est_fg').val(fg);
1027 $('#est_fg2').val(fg);
1028 }
1029
1030 function calcABV() {
1031 var abv = abvol(parseFloat($("#est_og").jqxNumberInput('decimal')), parseFloat($("#est_fg").jqxNumberInput('decimal')));
1032 $("#est_abv").val(abv);
1033 $("#est_abv2").val(abv);
1034 };
1035
1036 function calcInit () { 1083 function calcInit () {
1037 console.log("calc.init()"); 1084 console.log("calc.init()");
1038 1085
1039 $("#calc_acid").on('checked', function (event) { 1086 $("#calc_acid").on('checked', function (event) {
1040 dataRecord.calc_acid = true; 1087 dataRecord.calc_acid = true;
1145 dataRecord.boil_size = new_boil; 1192 dataRecord.boil_size = new_boil;
1146 $("#boil_size").val(Math.round(new_boil * 100) / 100); 1193 $("#boil_size").val(Math.round(new_boil * 100) / 100);
1147 dataRecord.batch_size = parseFloat(event.args.value); 1194 dataRecord.batch_size = parseFloat(event.args.value);
1148 calcFermentablesFromOG(parseFloat($("#est_og").jqxNumberInput('decimal'))); // Keep the OG 1195 calcFermentablesFromOG(parseFloat($("#est_og").jqxNumberInput('decimal'))); // Keep the OG
1149 calcFermentables(); 1196 calcFermentables();
1150 calcSVG();
1151 calcFG();
1152 calcABV();
1153 // TODO: adjust the hops, miscs, yeast, water. 1197 // TODO: adjust the hops, miscs, yeast, water.
1154 calcIBUs(); 1198 calcIBUs();
1155 }); 1199 });
1156 $('#boil_time').on('change', function (event) { 1200 $('#boil_time').on('change', function (event) {
1157 console.log("boil_time change:"+parseFloat(event.args.value)+" old:"+dataRecord.boil_time); 1201 console.log("boil_time change:"+parseFloat(event.args.value)+" old:"+dataRecord.boil_time);
1161 // console.log("old_evap:"+old_evap+" new_evap:"+new_evap+" new_boil:"+new_boil); 1205 // console.log("old_evap:"+old_evap+" new_evap:"+new_evap+" new_boil:"+new_boil);
1162 dataRecord.boil_time = parseFloat(event.args.value); 1206 dataRecord.boil_time = parseFloat(event.args.value);
1163 dataRecord.boil_size = new_boil; 1207 dataRecord.boil_size = new_boil;
1164 $("#boil_size").val(Math.round(new_boil * 100) / 100); 1208 $("#boil_size").val(Math.round(new_boil * 100) / 100);
1165 calcFermentables(); 1209 calcFermentables();
1166 calcSVG();
1167 calcFG();
1168 calcABV();
1169 // TODO: adjust the hops, miscs, yeast, water. 1210 // TODO: adjust the hops, miscs, yeast, water.
1170 calcIBUs(); 1211 calcIBUs();
1171 }); 1212 });
1172 $('#efficiency').on('change', function (event) { 1213 $('#efficiency').on('change', function (event) {
1173 console.log("efficiency change:"+event.args.value); 1214 console.log("efficiency change:"+event.args.value);
1174 calcFermentables(); 1215 calcFermentables();
1175 calcSVG();
1176 calcFG();
1177 calcABV();
1178 calcIBUs(); 1216 calcIBUs();
1179 }); 1217 });
1180 $('#est_og').on('change', function (event) { 1218 $('#est_og').on('change', function (event) {
1181 console.log("est_og change:"+event.args.value); 1219 console.log("est_og change:"+event.args.value);
1182 calcFermentablesFromOG(event.args.value); // Adjust fermentables amounts 1220 calcFermentablesFromOG(event.args.value); // Adjust fermentables amounts
1183 calcFermentables(); // Update the recipe details 1221 calcFermentables(); // Update the recipe details
1184 calcSVG();
1185 calcFG();
1186 calcABV(); // and ABV
1187 calcIBUs(); // and the IBU's. 1222 calcIBUs(); // and the IBU's.
1188 }); 1223 });
1189 $('#mash_ph').on('change', function (event) { 1224 $('#mash_ph').on('change', function (event) {
1190 dataRecord.mash_ph = parseFloat(event.args.value); 1225 dataRecord.mash_ph = parseFloat(event.args.value);
1191 calcWater(); 1226 calcWater();
1605 } 1640 }
1606 } else { 1641 } else {
1607 $("#fermentableGrid").jqxGrid('setcellvalue', 0, "f_percentage", 100); 1642 $("#fermentableGrid").jqxGrid('setcellvalue', 0, "f_percentage", 100);
1608 } 1643 }
1609 calcFermentables(); 1644 calcFermentables();
1610 calcSVG();
1611 calcFG();
1612 calcABV();
1613 calcIBUs(); 1645 calcIBUs();
1614 }); 1646 });
1615 }, 1647 },
1616 ready: function() { 1648 ready: function() {
1617 calcFermentables(); 1649 calcFermentables();
2174 var commit = $("#yeastGrid").jqxGrid('deleterow', id); 2206 var commit = $("#yeastGrid").jqxGrid('deleterow', id);
2175 } 2207 }
2176 }); 2208 });
2177 }, 2209 },
2178 ready: function() { 2210 ready: function() {
2179 calcSVG(); 2211 calcFermentables();
2180 $('#jqxTabs').jqxTabs('next'); 2212 $('#jqxTabs').jqxTabs('next');
2181 }, 2213 },
2182 columns: [ 2214 columns: [
2183 { text: 'Gist', datafield: 'y_name' }, 2215 { text: 'Gist', datafield: 'y_name' },
2184 { text: 'Laboratorium', width: 150, datafield: 'y_laboratory' }, 2216 { text: 'Laboratorium', width: 150, datafield: 'y_laboratory' },
2322 var commit = $("#mashGrid").jqxGrid('deleterow', id); 2354 var commit = $("#mashGrid").jqxGrid('deleterow', id);
2323 } 2355 }
2324 }); 2356 });
2325 }, 2357 },
2326 ready: function() { 2358 ready: function() {
2327 calcFG(); 2359 calcFermentables();
2328 calcInit(); 2360 calcInit();
2329 $('#jqxLoader').jqxLoader('close'); 2361 $('#jqxLoader').jqxLoader('close');
2330 $('#jqxTabs').jqxTabs('first'); 2362 $('#jqxTabs').jqxTabs('first');
2331 // setReadonly(dataRecord.locked); 2363 // setReadonly(dataRecord.locked);
2332 }, 2364 },
2368 ] 2400 ]
2369 }); 2401 });
2370 }; 2402 };
2371 2403
2372 // initialize the input fields. 2404 // initialize the input fields.
2373 var srcBase = [ "NaHCO3", "Na2CO3", "CaCO3", "Ca(OH)2" ];
2374 var srcAcid = [ "Melkzuur", "Zoutzuur", "Fosforzuur", "Zwavelzuur" ];
2375 var srcSource = [ "Bron 1", "Bron 2", "Gemengd" ];
2376
2377 // Tab 1, Algemeen 2405 // Tab 1, Algemeen
2378 $("#name").jqxTooltip({ content: 'De naam voor dit recept.' }); 2406 $("#name").jqxTooltip({ content: 'De naam voor dit recept.' });
2379 $("#name").jqxInput({ theme: theme, width: 640, height: 23 }); 2407 $("#name").jqxInput({ theme: theme, width: 640, height: 23 });
2380 $("#locked").jqxCheckBox({ theme: theme, width: 120, height: 23 }); 2408 $("#locked").jqxCheckBox({ theme: theme, width: 120, height: 23 });
2381 $("#notes").jqxTooltip({ content: 'De uitgebreide opmerkingen over dit recept.' }); 2409 $("#notes").jqxTooltip({ content: 'De uitgebreide opmerkingen over dit recept.' });
2410 $("#st_category").jqxTooltip({ content: 'De Amerikaanse bierstijl categorie.'}); 2438 $("#st_category").jqxTooltip({ content: 'De Amerikaanse bierstijl categorie.'});
2411 $("#st_category").jqxInput({ theme: theme, width: 250, height: 23 }); 2439 $("#st_category").jqxInput({ theme: theme, width: 250, height: 23 });
2412 $("#st_category_number").jqxTooltip({ content: 'De Amerikaanse bierstijl categorie sub nummer.'}); 2440 $("#st_category_number").jqxTooltip({ content: 'De Amerikaanse bierstijl categorie sub nummer.'});
2413 $("#st_category_number").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true }); 2441 $("#st_category_number").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
2414 $("#st_type").jqxTooltip({ content: 'Het bierstijl type.'}); 2442 $("#st_type").jqxTooltip({ content: 'Het bierstijl type.'});
2415 $("#st_type").jqxInput({ theme: theme, width: 180, height: 23 }); 2443 $("#st_type").jqxInput({ theme: theme, width: 250, height: 23 });
2416 2444
2417 $("#est_og").jqxTooltip({ content: 'Het begin SG wat je wilt bereiken. De moutstort wordt automatisch herberekend.' }); 2445 $("#est_og").jqxTooltip({ content: 'Het begin SG wat je wilt bereiken. De moutstort wordt automatisch herberekend.' });
2418 $("#est_og").jqxNumberInput( SGopts ); 2446 $("#est_og").jqxNumberInput( SGopts );
2419 $("#st_og_min").jqxTooltip({ content: 'Het minimum begin SG voor deze bierstijl.'}); 2447 $("#st_og_min").jqxTooltip({ content: 'Het minimum begin SG voor deze bierstijl.'});
2420 $("#st_og_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true }); 2448 $("#st_og_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true });
2421 $("#st_og_max").jqxTooltip({ content: 'Het maximum begin SG voor deze bierstijl.'}); 2449 $("#st_og_max").jqxTooltip({ content: 'Het maximum begin SG voor deze bierstijl.'});
2422 $("#st_og_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true }); 2450 $("#st_og_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true });
2423 2451
2424 $("#est_fg").jqxTooltip({ content: 'Het eind SG. Dit wordt automatisch berekend.' }); 2452 $("#est_fg").jqxTooltip({ content: 'Het eind SG. Dit wordt automatisch berekend.' });
2425 $("#est_fg").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 3, readOnly: true }); 2453 $("#est_fg").jqxNumberInput( Show3dec );
2426 $("#st_fg_min").jqxTooltip({ content: 'Het minimum eind SG voor deze bierstijl.'}); 2454 $("#st_fg_min").jqxTooltip({ content: 'Het minimum eind SG voor deze bierstijl.'});
2427 $("#st_fg_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true }); 2455 $("#st_fg_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true });
2428 $("#st_fg_max").jqxTooltip({ content: 'Het maximum eind SG voor deze bierstijl.'}); 2456 $("#st_fg_max").jqxTooltip({ content: 'Het maximum eind SG voor deze bierstijl.'});
2429 $("#st_fg_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true }); 2457 $("#st_fg_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true });
2430 2458
2434 $("#st_abv_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true }); 2462 $("#st_abv_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true });
2435 $("#st_abv_max").jqxTooltip({ content: 'Het maximum alcohol volume % voor deze bierstijl.'}); 2463 $("#st_abv_max").jqxTooltip({ content: 'Het maximum alcohol volume % voor deze bierstijl.'});
2436 $("#st_abv_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true }); 2464 $("#st_abv_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true });
2437 2465
2438 $("#est_color").jqxTooltip({ content: 'De kleur in EBC. Dit wordt automatisch berekend.' }); 2466 $("#est_color").jqxTooltip({ content: 'De kleur in EBC. Dit wordt automatisch berekend.' });
2439 $("#est_color").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 0, readOnly: true }); 2467 $("#est_color").jqxNumberInput( Show0dec );
2440 $("#st_color_min").jqxTooltip({ content: 'De minimum kleur voor deze bierstijl.'}); 2468 $("#st_color_min").jqxTooltip({ content: 'De minimum kleur voor deze bierstijl.'});
2441 $("#st_color_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true }); 2469 $("#st_color_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
2442 $("#st_color_max").jqxTooltip({ content: 'De maximum kleur voor deze bierstijl.'}); 2470 $("#st_color_max").jqxTooltip({ content: 'De maximum kleur voor deze bierstijl.'});
2443 $("#st_color_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true }); 2471 $("#st_color_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
2444 $("#color_method").jqxDropDownList({ 2472 $("#color_method").jqxDropDownList({
2450 height: 23, 2478 height: 23,
2451 autoDropDownHeight: true 2479 autoDropDownHeight: true
2452 }); 2480 });
2453 2481
2454 $("#est_ibu").jqxTooltip({ content: 'De bitterheid in IBU. Dit wordt automatisch berekend.' }); 2482 $("#est_ibu").jqxTooltip({ content: 'De bitterheid in IBU. Dit wordt automatisch berekend.' });
2455 $("#est_ibu").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 0, readOnly: true }); 2483 $("#est_ibu").jqxNumberInput( Show0dec );
2456 $("#st_ibu_min").jqxTooltip({ content: 'De minimum bitterheid voor deze bierstijl.'}); 2484 $("#st_ibu_min").jqxTooltip({ content: 'De minimum bitterheid voor deze bierstijl.'});
2457 $("#st_ibu_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true }); 2485 $("#st_ibu_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
2458 $("#st_ibu_max").jqxTooltip({ content: 'De maximum bitterheid voor deze bierstijl.'}); 2486 $("#st_ibu_max").jqxTooltip({ content: 'De maximum bitterheid voor deze bierstijl.'});
2459 $("#st_ibu_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true }); 2487 $("#st_ibu_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
2460 $("#ibu_method").jqxDropDownList({ 2488 $("#ibu_method").jqxDropDownList({
2475 $("#st_carb_max").jqxTooltip({ content: 'Het maximum koolzuur volume voor deze bierstijl.'}); 2503 $("#st_carb_max").jqxTooltip({ content: 'Het maximum koolzuur volume voor deze bierstijl.'});
2476 $("#st_carb_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true }); 2504 $("#st_carb_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true });
2477 2505
2478 // Tab 2, Vergistbaar 2506 // Tab 2, Vergistbaar
2479 $("#est_color2").jqxTooltip({ content: 'De kleur in EBC. Dit wordt automatisch berekend.' }); 2507 $("#est_color2").jqxTooltip({ content: 'De kleur in EBC. Dit wordt automatisch berekend.' });
2480 $("#est_color2").jqxNumberInput({ inputMode: 'simple', theme: theme, symbol: ' EBC', symbolPosition: 'right', width: 100, height: 23, decimalDigits: 0, readOnly: true }); 2508 $("#est_color2").jqxNumberInput( Show0dec );
2481 $("#est_og2").jqxTooltip({ content: 'Het begin SG wat je wilt bereiken. De moutstort wordt automatisch herberekend.' }); 2509 $("#est_og2").jqxTooltip({ content: 'Het begin SG wat je wilt bereiken. De moutstort wordt automatisch herberekend.' });
2482 $("#est_og2").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 100, height: 23, decimalDigits: 3, readOnly: true }); 2510 $("#est_og2").jqxNumberInput( Show3dec );
2483 $("#perc_malts").jqxProgressBar({ width: 300, height: 23, theme: theme, showText: true }); 2511 $("#perc_malts").jqxProgressBar({
2484 $("#perc_sugars").jqxProgressBar({ width: 300, height: 23, theme: theme, showText: true }); 2512 width: 300,
2485 $("#perc_cara").jqxProgressBar({ width: 300, height: 23, theme: theme, showText: true }); 2513 height: 23,
2514 theme: theme,
2515 showText: true,
2516 animationDuration: 0,
2517 colorRanges: [
2518 { stop: 90, color: '#008C00' },
2519 { stop: 95, color: '#EB7331' },
2520 { stop: 100, color: '#FF0000' }
2521 ]
2522 });
2523 $("#perc_sugars").jqxProgressBar({
2524 width: 300,
2525 height: 23,
2526 theme: theme,
2527 showText: true,
2528 animationDuration: 0,
2529 colorRanges: [
2530 { stop: 20, color: '#008C00' },
2531 { stop: 100, color: '#FF0000' }
2532 ]
2533 });
2534 $("#perc_cara").jqxProgressBar({
2535 width: 300,
2536 height: 23,
2537 theme: theme,
2538 showText: true,
2539 animationDuration: 0,
2540 colorRanges: [
2541 { stop: 25, color: '#008C00' },
2542 { stop: 100, color: '#FF0000' }
2543 ]
2544 });
2486 $("#popupFermentable").jqxWindow({ 2545 $("#popupFermentable").jqxWindow({
2487 width: 800, 2546 width: 800,
2488 height: 300, 2547 height: 300,
2489 position: { x: 230, y: 100 }, 2548 position: { x: 230, y: 100 },
2490 resizable: false, 2549 resizable: false,
2497 $("#FermentableReady").jqxButton({ template: "success", width: '90px', theme: theme }); 2556 $("#FermentableReady").jqxButton({ template: "success", width: '90px', theme: theme });
2498 $("#FermentableReady").click(function () { 2557 $("#FermentableReady").click(function () {
2499 $("#fermentableGrid").jqxGrid('sortby', 'f_amount', 'desc'); 2558 $("#fermentableGrid").jqxGrid('sortby', 'f_amount', 'desc');
2500 // Recalc percentages 2559 // Recalc percentages
2501 calcFermentables(); 2560 calcFermentables();
2502 calcSVG();
2503 calcFG();
2504 calcABV();
2505 calcIBUs(); 2561 calcIBUs();
2506 // Waters: yes there is impact. 2562 // Waters: yes there is impact.
2507 }); 2563 });
2508 $("#wf_name").jqxInput({ theme: theme, width: 320, height: 23 }); 2564 $("#wf_name").jqxInput({ theme: theme, width: 320, height: 23 });
2509 $("#wf_instock").jqxCheckBox({ theme: theme, height: 23 }); 2565 $("#wf_instock").jqxCheckBox({ theme: theme, height: 23 });
2666 width: 180, 2722 width: 180,
2667 height: 23, 2723 height: 23,
2668 autoDropDownHeight: true, 2724 autoDropDownHeight: true,
2669 dropDownVerticalAlignment: 'top' 2725 dropDownVerticalAlignment: 'top'
2670 }); 2726 });
2727 $("#wf_added").on('select', function (event) {
2728 if (event.args) {
2729 var index = event.args.index;
2730 $("#fermentableGrid").jqxGrid('setcellvalue', fermentableRow, 'f_added', index);
2731 calcFermentables();
2732 calcIBUs();
2733 }
2734 });
2671 2735
2672 // Tab 3, Hoppen 2736 // Tab 3, Hoppen
2673 $("#est_ibu2").jqxTooltip({ content: 'De bitterheid in IBU. Dit wordt automatisch berekend.' }); 2737 $("#est_ibu2").jqxTooltip({ content: 'De bitterheid in IBU. Dit wordt automatisch berekend.' });
2674 $("#est_ibu2").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true }); 2738 $("#est_ibu2").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
2675 $("#hop_flavour").jqxProgressBar({ width: 300, height: 23, theme: theme, showText: true }); 2739 $("#hop_flavour").jqxProgressBar({
2676 $("#hop_aroma").jqxProgressBar({ width: 300, height: 23, theme: theme, showText: true }); 2740 width: 300,
2741 height: 23,
2742 theme: theme,
2743 showText: true,
2744 animationDuration: 0,
2745 colorRanges: [
2746 { stop: 20, color: '#004D00' },
2747 { stop: 40, color: '#008C00' },
2748 { stop: 60, color: '#00BF00' },
2749 { stop: 80, color: '#00FF00' },
2750 { stop: 100, color: '#80FF80' }
2751 ]
2752 });
2753 $("#hop_aroma").jqxProgressBar({
2754 width: 300,
2755 height: 23,
2756 theme: theme,
2757 showText: true,
2758 animationDuration: 0,
2759 colorRanges: [
2760 { stop: 20, color: '#004D00' },
2761 { stop: 40, color: '#008C00' },
2762 { stop: 60, color: '#00BF00' },
2763 { stop: 80, color: '#00FF00' },
2764 { stop: 100, color: '#80FF80' }
2765 ]
2766 });
2677 $("#popupHop").jqxWindow({ 2767 $("#popupHop").jqxWindow({
2678 width: 800, 2768 width: 800,
2679 height: 300, 2769 height: 300,
2680 position: { x: 230, y: 100 }, 2770 position: { x: 230, y: 100 },
2681 resizable: false, 2771 resizable: false,
2744 parseFloat(rowdata.h_alpha), $("#ibu_method").val() 2834 parseFloat(rowdata.h_alpha), $("#ibu_method").val()
2745 ); 2835 );
2746 rowdata.h_amount = amount; 2836 rowdata.h_amount = amount;
2747 calcIBUs(); 2837 calcIBUs();
2748 }); 2838 });
2749 $("#wh_ibu").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 1, readOnly: true }); 2839 $("#wh_ibu").jqxNumberInput( Show1dec );
2750 $("#wh_time").jqxNumberInput( PosInt ); 2840 $("#wh_time").jqxNumberInput( PosInt );
2751 $("#wh_time").on('change', function (event) { 2841 $("#wh_time").on('change', function (event) {
2752 console.log("time changed: "+event.args.value); 2842 console.log("time changed: "+event.args.value);
2753 var rowdata = $("#hopGrid").jqxGrid('getrowdata', hopRow); 2843 var rowdata = $("#hopGrid").jqxGrid('getrowdata', hopRow);
2754 var newtime = parseFloat(event.args.value); 2844 var newtime = parseFloat(event.args.value);
2908 } 2998 }
2909 }); 2999 });
2910 3000
2911 // Tab 5, Gist 3001 // Tab 5, Gist
2912 $("#est_fg2").jqxTooltip({ content: 'Het eind SG. Dit wordt automatisch berekend.' }); 3002 $("#est_fg2").jqxTooltip({ content: 'Het eind SG. Dit wordt automatisch berekend.' });
2913 $("#est_fg2").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 3, readOnly: true }); 3003 $("#est_fg2").jqxNumberInput( Show3dec );
2914 $("#est_abv2").jqxTooltip({ content: 'Alcohol volume %. Dit wordt automatisch berekend.' }); 3004 $("#est_abv2").jqxTooltip({ content: 'Alcohol volume %. Dit wordt automatisch berekend.' });
2915 $("#est_abv2").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true }); 3005 $("#est_abv2").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true });
2916 $("#popupYeast").jqxWindow({ 3006 $("#popupYeast").jqxWindow({
2917 width: 800, 3007 width: 800,
2918 height: 300, 3008 height: 300,
2924 cancelButton: $("#YeastReady"), 3014 cancelButton: $("#YeastReady"),
2925 modalOpacity: 0.40 3015 modalOpacity: 0.40
2926 }); 3016 });
2927 $("#YeastReady").jqxButton({ template: "success", width: '90px', theme: theme }); 3017 $("#YeastReady").jqxButton({ template: "success", width: '90px', theme: theme });
2928 $("#YeastReady").click(function () { 3018 $("#YeastReady").click(function () {
2929 calcSVG(); 3019 calcFermentables();
2930 calcFG();
2931 calcABV();
2932 $("#yeastGrid").jqxGrid('sortby', 'y_use', 'asc'); 3020 $("#yeastGrid").jqxGrid('sortby', 'y_use', 'asc');
2933 }); 3021 });
2934 $("#wy_name").jqxInput({ theme: theme, width: 320, height: 23 }); 3022 $("#wy_name").jqxInput({ theme: theme, width: 320, height: 23 });
2935 $("#wy_laboratory").jqxInput({ theme: theme, width: 320, height: 23 }); 3023 $("#wy_laboratory").jqxInput({ theme: theme, width: 320, height: 23 });
2936 $("#wy_product_id").jqxInput({ theme: theme, width: 320, height: 23 }); 3024 $("#wy_product_id").jqxInput({ theme: theme, width: 320, height: 23 });
2978 } else if (rowdata.y_form == 1) { 3066 } else if (rowdata.y_form == 1) {
2979 $("#wy_pmpt_amount").html("Gewicht gram:"); 3067 $("#wy_pmpt_amount").html("Gewicht gram:");
2980 } else { 3068 } else {
2981 $("#wy_pmpt_amount").html("Volume ml:"); 3069 $("#wy_pmpt_amount").html("Volume ml:");
2982 } 3070 }
2983 calcSVG(); 3071 calcFermentables();
2984 calcFG();
2985 calcABV();
2986 } 3072 }
2987 }); 3073 });
2988 $("#wy_amount").jqxNumberInput( Spin1dec ); 3074 $("#wy_amount").jqxNumberInput( Spin1dec );
2989 $('#wy_amount').on('change', function (event) { 3075 $('#wy_amount').on('change', function (event) {
2990 console.log("amount changed: "+event.args.value); 3076 console.log("amount changed: "+event.args.value);
2992 if (rowdata.y_form == 0) // Liquid 3078 if (rowdata.y_form == 0) // Liquid
2993 var amount = parseFloat(event.args.value); 3079 var amount = parseFloat(event.args.value);
2994 else 3080 else
2995 var amount = parseFloat(event.args.value) / 1000; 3081 var amount = parseFloat(event.args.value) / 1000;
2996 rowdata.y_amount = amount; 3082 rowdata.y_amount = amount;
2997 calcSVG(); 3083 calcFermentables();
2998 calcFG();
2999 calcABV();
3000 }); 3084 });
3001 $("#wy_use").jqxDropDownList({ 3085 $("#wy_use").jqxDropDownList({
3002 theme: theme, 3086 theme: theme,
3003 source: YeastUseAdapter, 3087 source: YeastUseAdapter,
3004 valueMember: 'id', 3088 valueMember: 'id',
3011 $("#wy_use").on('select', function (event) { 3095 $("#wy_use").on('select', function (event) {
3012 if (event.args) { 3096 if (event.args) {
3013 var index = event.args.index; 3097 var index = event.args.index;
3014 var rowdata = $("#yeastGrid").jqxGrid('getrowdata', yeastRow); 3098 var rowdata = $("#yeastGrid").jqxGrid('getrowdata', yeastRow);
3015 rowdata.y_use = index; 3099 rowdata.y_use = index;
3016 calcSVG(); 3100 calcFermentabes();
3017 calcFG();
3018 calcABV();
3019 } 3101 }
3020 }); 3102 });
3021 3103
3022 // Tab 6, Maischen 3104 // Tab 6, Maischen
3023 $("#mash_name").jqxInput({ theme: theme, width: 320, height: 23 }); 3105 $("#mash_name").jqxInput({ theme: theme, width: 320, height: 23 });
3145 mash_infuse += parseFloat(row.step_infuse_amount); 3227 mash_infuse += parseFloat(row.step_infuse_amount);
3146 } 3228 }
3147 }); 3229 });
3148 3230
3149 // Tab 7, Water 3231 // Tab 7, Water
3150 $("#tgt_bu").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 2, readOnly: true }); 3232 $("#tgt_bu").jqxNumberInput( Show2wat );
3151 $("#tgt_cl_so4").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3233 $("#tgt_cl_so4").jqxNumberInput( Show1wat );
3152 3234
3153 // Water source 1 3235 // Water source 1
3154 $("#w1_name").jqxDropDownList({ 3236 $("#w1_name").jqxDropDownList({
3155 placeHolder: "Kies hoofd water:", 3237 placeHolder: "Kies hoofd water:",
3156 theme: theme, 3238 theme: theme,
3183 $("#w1_cost").val(datarecord.cost); 3265 $("#w1_cost").val(datarecord.cost);
3184 dataRecord.w1_cost = datarecord.cost; 3266 dataRecord.w1_cost = datarecord.cost;
3185 calcWater(); 3267 calcWater();
3186 } 3268 }
3187 }); 3269 });
3188 $("#w1_amount").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3270 $("#w1_amount").jqxNumberInput( Show1wat );
3189 $("#w1_calcium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3271 $("#w1_calcium").jqxNumberInput( Show1wat );
3190 $("#w1_magnesium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3272 $("#w1_magnesium").jqxNumberInput( Show1wat );
3191 $("#w1_sodium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3273 $("#w1_sodium").jqxNumberInput( Show1wat );
3192 $("#w1_total_alkalinity").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3274 $("#w1_total_alkalinity").jqxNumberInput( Show1wat );
3193 $("#w1_chloride").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3275 $("#w1_chloride").jqxNumberInput( Show1wat );
3194 $("#w1_sulfate").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3276 $("#w1_sulfate").jqxNumberInput( Show1wat );
3195 $("#w1_ph").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3277 $("#w1_ph").jqxNumberInput( Show1wat );
3196 // Water source 2 3278 // Water source 2
3197 $("#w2_name").jqxDropDownList({ 3279 $("#w2_name").jqxDropDownList({
3198 placeHolder: "Kies meng water:", 3280 placeHolder: "Kies meng water:",
3199 theme: theme, 3281 theme: theme,
3200 source: waterlist, 3282 source: waterlist,
3228 $("#w2_amount").jqxNumberInput({ max: 100000, readOnly: false }); // Set high max to enable the spinbuttons. 3310 $("#w2_amount").jqxNumberInput({ max: 100000, readOnly: false }); // Set high max to enable the spinbuttons.
3229 calcWater(); 3311 calcWater();
3230 } 3312 }
3231 }); 3313 });
3232 $("#w2_amount").jqxTooltip({ content: 'De verdeling van het hoofd en meng water. Het totale maisch water volume blijft gelijk.'}); 3314 $("#w2_amount").jqxTooltip({ content: 'De verdeling van het hoofd en meng water. Het totale maisch water volume blijft gelijk.'});
3233 $("#w2_amount").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 94, height: 23, min: 0, max: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5, readOnly: true }); 3315 $("#w2_amount").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 94, height: 23, min: 0, max: 0, decimalDigits: 1, spinButtons: true, readOnly: true });
3234 $("#w2_calcium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3316 $("#w2_calcium").jqxNumberInput( Show1wat );
3235 $("#w2_magnesium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3317 $("#w2_magnesium").jqxNumberInput( Show1wat );
3236 $("#w2_sodium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3318 $("#w2_sodium").jqxNumberInput( Show1wat );
3237 $("#w2_total_alkalinity").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3319 $("#w2_total_alkalinity").jqxNumberInput( Show1wat );
3238 $("#w2_chloride").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3320 $("#w2_chloride").jqxNumberInput( Show1wat );
3239 $("#w2_sulfate").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3321 $("#w2_sulfate").jqxNumberInput( Show1wat );
3240 $("#w2_ph").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3322 $("#w2_ph").jqxNumberInput( Show1wat );
3241 // Water mixed 3323 // Water mixed
3242 $("#wg_amount").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3324 $("#wg_amount").jqxNumberInput( Show1wat );
3243 $("#wg_calcium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3325 $("#wg_calcium").jqxNumberInput( Show1wat );
3244 $("#wg_magnesium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3326 $("#wg_magnesium").jqxNumberInput( Show1wat );
3245 $("#wg_sodium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3327 $("#wg_sodium").jqxNumberInput( Show1wat );
3246 $("#wg_total_alkalinity").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3328 $("#wg_total_alkalinity").jqxNumberInput( Show1wat );
3247 $("#wg_chloride").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3329 $("#wg_chloride").jqxNumberInput( Show1wat );
3248 $("#wg_sulfate").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3330 $("#wg_sulfate").jqxNumberInput( Show1wat );
3249 $("#wg_ph").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3331 $("#wg_ph").jqxNumberInput( Show1wat );
3250 // Water treated 3332 // Water treated
3251 $("#wb_calcium").jqxTooltip({ content: 'De ideale hoeveelheid Calcium is tussen 40 en 150.'}); 3333 $("#wb_calcium").jqxTooltip({ content: 'De ideale hoeveelheid Calcium is tussen 40 en 150.'});
3252 $("#wb_calcium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3334 $("#wb_calcium").jqxNumberInput( Show1wat );
3253 $("#wb_magnesium").jqxTooltip({ content: 'De ideale hoeveelheid Magnesium is lager dan 30.'}); 3335 $("#wb_magnesium").jqxTooltip({ content: 'De ideale hoeveelheid Magnesium is lager dan 30.'});
3254 $("#wb_magnesium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3336 $("#wb_magnesium").jqxNumberInput( Show1wat );
3255 $("#wb_sodium").jqxTooltip({ content: 'De ideale hoeveelheid Natrium is lager dan 150.'}); 3337 $("#wb_sodium").jqxTooltip({ content: 'De ideale hoeveelheid Natrium is lager dan 150.'});
3256 $("#wb_sodium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3338 $("#wb_sodium").jqxNumberInput( Show1wat );
3257 $("#wb_chloride").jqxTooltip({ content: 'De ideale hoeveelheid Chloride is lager dan 100.'}); 3339 $("#wb_chloride").jqxTooltip({ content: 'De ideale hoeveelheid Chloride is lager dan 100.'});
3258 $("#wb_chloride").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3340 $("#wb_chloride").jqxNumberInput( Show1wat );
3259 $("#wb_sulfate").jqxTooltip({ content: 'De ideale hoeveelheid Sulfaat is lager dan 350.'}); 3341 $("#wb_sulfate").jqxTooltip({ content: 'De ideale hoeveelheid Sulfaat is lager dan 350.'});
3260 $("#wb_sulfate").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3342 $("#wb_sulfate").jqxNumberInput( Show1wat );
3261 $("#wb_total_alkalinity").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3343 $("#wb_total_alkalinity").jqxNumberInput( Show1wat );
3262 $("#wb_ph").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3344 $("#wb_ph").jqxNumberInput( Show1wat );
3263 // Water target profile 3345 // Water target profile
3264 $("#pr_name").jqxDropDownList({ 3346 $("#pr_name").jqxDropDownList({
3265 placeHolder: "Kies doel profiel:", 3347 placeHolder: "Kies doel profiel:",
3266 theme: theme, 3348 theme: theme,
3267 source: waterprofiles, 3349 source: waterprofiles,
3281 $("#pr_sodium").val(datarecord.sodium); 3363 $("#pr_sodium").val(datarecord.sodium);
3282 $("#pr_magnesium").val(datarecord.magnesium); 3364 $("#pr_magnesium").val(datarecord.magnesium);
3283 $("#pr_total_alkalinity").val(datarecord.total_alkalinity); 3365 $("#pr_total_alkalinity").val(datarecord.total_alkalinity);
3284 } 3366 }
3285 }); 3367 });
3286 $("#pr_calcium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3368 $("#pr_calcium").jqxNumberInput( Show1wat );
3287 $("#pr_magnesium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3369 $("#pr_magnesium").jqxNumberInput( Show1wat );
3288 $("#pr_sodium").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3370 $("#pr_sodium").jqxNumberInput( Show1wat );
3289 $("#pr_total_alkalinity").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3371 $("#pr_total_alkalinity").jqxNumberInput( Show1wat );
3290 $("#pr_chloride").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3372 $("#pr_chloride").jqxNumberInput( Show1wat );
3291 $("#pr_sulfate").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true }); 3373 $("#pr_sulfate").jqxNumberInput( Show1wat );
3292 3374
3293 // Water agents 3375 // Water agents
3294 $("#wa_cacl2").jqxTooltip({ content: 'Voor het maken van een ander waterprofiel. Voegt calcium en chloride toe. Voor het verbeteren van zoetere bieren.'}); 3376 $("#wa_cacl2").jqxTooltip({ content: 'Voor het maken van een ander waterprofiel. Voegt calcium en chloride toe. Voor het verbeteren van zoetere bieren.'});
3295 $("#wa_cacl2").jqxNumberInput( Spin1dec ); 3377 $("#wa_cacl2").jqxNumberInput( Spin1dec );
3296 $("#wa_caso4").jqxTooltip({ content: 'Gips. Voor het maken van een ander waterprofiel. Voegt calcium en sulfaat toe. Voor het verbeteren van bittere bieren.'}); 3378 $("#wa_caso4").jqxTooltip({ content: 'Gips. Voor het maken van een ander waterprofiel. Voegt calcium en sulfaat toe. Voor het verbeteren van bittere bieren.'});

mercurial