95 { name: 'harvest_top', type: 'int' }, |
95 { name: 'harvest_top', type: 'int' }, |
96 { name: 'harvest_time', type: 'int' }, |
96 { name: 'harvest_time', type: 'int' }, |
97 { name: 'pitch_temperature', type: 'float' }, |
97 { name: 'pitch_temperature', type: 'float' }, |
98 { name: 'pofpos', type: 'int' }, |
98 { name: 'pofpos', type: 'int' }, |
99 { name: 'zymocide', type: 'int' }, |
99 { name: 'zymocide', type: 'int' }, |
|
100 { name: 'gr_hl_lo', type: 'int' }, |
|
101 { name: 'sg_lo', type: 'float' }, |
|
102 { name: 'gr_hl_hi', type: 'int' }, |
|
103 { name: 'sg_hi', type: 'float' }, |
100 { name: 'short_desc', type: 'string' } |
104 { name: 'short_desc', type: 'string' } |
101 ], |
105 ], |
102 id: 'record', |
106 id: 'record', |
103 url: url, |
107 url: url, |
104 deleterow: function(rowid, commit) { |
108 deleterow: function(rowid, commit) { |
171 valueMember: 'nl', |
175 valueMember: 'nl', |
172 displayMember: 'nl', |
176 displayMember: 'nl', |
173 width: 180, |
177 width: 180, |
174 height: 23, |
178 height: 23, |
175 autoDropDownHeight: true |
179 autoDropDownHeight: true |
|
180 }); |
|
181 $('#gr_hl_lo').jqxNumberInput(PosInt); |
|
182 $('#gr_hl_lo').jqxNumberInput({ min: 30, max: 200 }); |
|
183 $('#sg_lo').jqxNumberInput(SGopts); |
|
184 $('#gr_hl_hi').jqxNumberInput(PosInt); |
|
185 $('#gr_hl_hi').jqxNumberInput({ min: 30, max: 200 }); |
|
186 $('#sg_hi').jqxNumberInput(SGopts); |
|
187 $('#pitch_lo').jqxInput({ theme: theme, width: 100, height: 23 }); |
|
188 $('#but_pitch_lo').jqxButton({ template: 'success', width: '23px', height: 23, theme: theme }); |
|
189 $('#but_pitch_lo').bind('click', function() { $('#pitchloWindow').jqxWindow('open'); }); |
|
190 $('#pitchloReady').jqxButton({ template: 'success', width: '90px', theme: theme }); |
|
191 $('#pitchloReady').click(function() { |
|
192 $('#pitch_lo').val($('#gr_hl_lo').val() + '@' + $('#sg_lo').val().toFixed(3)); |
|
193 }); |
|
194 $('#pitch_hi').jqxInput({ theme: theme, width: 100, height: 23 }); |
|
195 $('#but_pitch_hi').jqxButton({ template: 'success', width: '23px', height: 23, theme: theme }); |
|
196 $('#but_pitch_hi').bind('click', function() { $('#pitchhiWindow').jqxWindow('open'); }); |
|
197 $('#pitchhiReady').jqxButton({ template: 'success', width: '90px', theme: theme }); |
|
198 $('#pitchhiReady').click(function() { |
|
199 $('#pitch_hi').val($('#gr_hl_hi').val() + '@' + $('#sg_hi').val().toFixed(3)); |
176 }); |
200 }); |
177 $('#notes').jqxInput({ theme: theme, width: 800, height: 120 }); |
201 $('#notes').jqxInput({ theme: theme, width: 800, height: 120 }); |
178 $('#best_for').jqxInput({ theme: theme, width: 320, height: 100 }); |
202 $('#best_for').jqxInput({ theme: theme, width: 320, height: 100 }); |
179 $('#inventory').jqxNumberInput(Spin1dec); |
203 $('#inventory').jqxNumberInput(Spin1dec); |
180 $('#production_date').jqxDateTimeInput(Dateopts); |
204 $('#production_date').jqxDateTimeInput(Dateopts); |
278 $('#harvest_top').val(0); |
302 $('#harvest_top').val(0); |
279 $('#harvest_time').val(0); |
303 $('#harvest_time').val(0); |
280 $('#pitch_temperature').val(0); |
304 $('#pitch_temperature').val(0); |
281 $('#pofpos').val(0); |
305 $('#pofpos').val(0); |
282 $('#zymocide').val(0); |
306 $('#zymocide').val(0); |
|
307 $('#gr_hl_lo').val(50); |
|
308 $('#sg_lo').val(1.050); |
|
309 $('#gr_hl_hi').val(80); |
|
310 $('#sg_hi').val(1.080); |
283 $('#popupWindow').jqxWindow('open'); |
311 $('#popupWindow').jqxWindow('open'); |
284 }); |
312 }); |
285 impButton.click(function(event) { |
313 impButton.click(function(event) { |
286 window.location.href = 'import_ingredients.php?select=yeasts'; |
314 window.location.href = 'import_ingredients.php?select=yeasts'; |
287 }); |
315 }); |
359 $('#harvest_top').val(dataRecord.harvest_top); |
387 $('#harvest_top').val(dataRecord.harvest_top); |
360 $('#harvest_time').val(dataRecord.harvest_time); |
388 $('#harvest_time').val(dataRecord.harvest_time); |
361 $('#pitch_temperature').val(parseFloat(dataRecord.pitch_temperature)); |
389 $('#pitch_temperature').val(parseFloat(dataRecord.pitch_temperature)); |
362 $('#pofpos').val(dataRecord.pofpos); |
390 $('#pofpos').val(dataRecord.pofpos); |
363 $('#zymocide').val(dataRecord.zymocide); |
391 $('#zymocide').val(dataRecord.zymocide); |
|
392 $('#gr_hl_lo').val(dataRecord.gr_hl_lo); |
|
393 $('#sg_lo').val(parseFloat(dataRecord.sg_lo)); |
|
394 $('#pitch_lo').val(dataRecord.gr_hl_lo + '@' + parseFloat(dataRecord.sg_lo).toFixed(3)); |
|
395 $('#gr_hl_hi').val(dataRecord.gr_hl_hi); |
|
396 $('#sg_hi').val(parseFloat(dataRecord.sg_hi)); |
|
397 $('#pitch_hi').val(dataRecord.gr_hl_hi + '@' + parseFloat(dataRecord.sg_hi).toFixed(3)); |
364 $('#short_desc').val(dataRecord.short_desc); |
398 $('#short_desc').val(dataRecord.short_desc); |
365 calcTotal(); |
399 calcTotal(); |
366 // show the popup window. |
400 // show the popup window. |
367 $('#popupWindow').jqxWindow('open'); |
401 $('#popupWindow').jqxWindow('open'); |
368 } |
402 } |
386 dataRecord.form = $('#form').val(); |
420 dataRecord.form = $('#form').val(); |
387 calcTotal(); |
421 calcTotal(); |
388 }); |
422 }); |
389 |
423 |
390 // initialize the popup window and buttons. |
424 // initialize the popup window and buttons. |
|
425 $('#pitchloWindow').jqxWindow({ |
|
426 theme: theme, |
|
427 position: { x: 380, y: 210 }, |
|
428 width: 500, |
|
429 height: 200, |
|
430 resizable: false, |
|
431 isModal: true, |
|
432 modalOpacity: 0.4, |
|
433 autoOpen: false, |
|
434 cancelButton: $('#pitchloReady') |
|
435 }); |
|
436 $('#pitchhiWindow').jqxWindow({ |
|
437 theme: theme, |
|
438 position: { x: 380, y: 210 }, |
|
439 width: 500, |
|
440 height: 200, |
|
441 resizable: false, |
|
442 isModal: true, |
|
443 modalOpacity: 0.4, |
|
444 autoOpen: false, |
|
445 cancelButton: $('#pitchhiReady') |
|
446 }); |
391 $('#popupWindow').jqxWindow({ |
447 $('#popupWindow').jqxWindow({ |
392 width: 1050, |
448 width: 1050, |
393 height: 625, |
449 height: 625, |
394 resizable: false, |
450 resizable: false, |
395 theme: theme, |
451 theme: theme, |
440 bacteria: $('#bacteria').val(), |
496 bacteria: $('#bacteria').val(), |
441 harvest_top: $('#harvest_top').val(), |
497 harvest_top: $('#harvest_top').val(), |
442 harvest_time: $('#harvest_time').val(), |
498 harvest_time: $('#harvest_time').val(), |
443 pitch_temperature: parseFloat($('#pitch_temperature').jqxNumberInput('decimal')), |
499 pitch_temperature: parseFloat($('#pitch_temperature').jqxNumberInput('decimal')), |
444 pofpos: $('#pofpos').val(), |
500 pofpos: $('#pofpos').val(), |
445 zymocide: $('#zymocide').val() |
501 zymocide: $('#zymocide').val(), |
|
502 gr_hl_lo: $('#gr_hl_lo').val(), |
|
503 sg_lo: parseFloat($('#sg_lo').jqxNumberInput('decimal')), |
|
504 gr_hl_hi: $('#gr_hl_hi').val(), |
|
505 sg_hi: parseFloat($('#sg_hi').jqxNumberInput('decimal')) |
446 }; |
506 }; |
447 $('#jqxgrid').jqxGrid('addrow', null, row); |
507 $('#jqxgrid').jqxGrid('addrow', null, row); |
448 $('#popupWindow').jqxWindow('hide'); |
508 $('#popupWindow').jqxWindow('hide'); |
449 }); |
509 }); |
450 $('#Save').jqxButton({ template: 'success', width: '90px', theme: theme }); |
510 $('#Save').jqxButton({ template: 'success', width: '90px', theme: theme }); |
483 harvest_top: $('#harvest_top').val(), |
543 harvest_top: $('#harvest_top').val(), |
484 harvest_time: $('#harvest_time').val(), |
544 harvest_time: $('#harvest_time').val(), |
485 pitch_temperature: parseFloat($('#pitch_temperature').jqxNumberInput('decimal')), |
545 pitch_temperature: parseFloat($('#pitch_temperature').jqxNumberInput('decimal')), |
486 pofpos: $('#pofpos').val(), |
546 pofpos: $('#pofpos').val(), |
487 zymocide: $('#zymocide').val(), |
547 zymocide: $('#zymocide').val(), |
|
548 gr_hl_lo: $('#gr_hl_lo').val(), |
|
549 sg_lo: parseFloat($('#sg_lo').jqxNumberInput('decimal')), |
|
550 gr_hl_hi: $('#gr_hl_hi').val(), |
|
551 sg_hi: parseFloat($('#sg_hi').jqxNumberInput('decimal')), |
488 short_desc: $('#short_desc').val() |
552 short_desc: $('#short_desc').val() |
489 }; |
553 }; |
490 if (editrow >= 0) { |
554 if (editrow >= 0) { |
491 $('#jqxgrid').jqxGrid('updaterow', rowID, row); |
555 $('#jqxgrid').jqxGrid('updaterow', rowID, row); |
492 } else { |
556 } else { |