www/js/prod_edit.js

changeset 381
0ec81755396e
parent 380
2242521067a7
child 382
547c23b50d00
equal deleted inserted replaced
380:2242521067a7 381:0ec81755396e
487 (row.h_inventory < row.h_amount)) 487 (row.h_inventory < row.h_amount))
488 ok_hops = 0; 488 ok_hops = 0;
489 } 489 }
490 total_ibus = Math.round(total_ibus * 10) / 10; 490 total_ibus = Math.round(total_ibus * 10) / 10;
491 ferm_ibus = Math.round(ferm_ibus * 10) / 10; 491 ferm_ibus = Math.round(ferm_ibus * 10) / 10;
492 hop_flavour = Math.round(hop_flavour * 100) / 10; 492 hop_flavour = Math.round(hop_flavour * 1000 / 7.5) / 10;
493 hop_aroma = Math.round(hop_aroma * 100) / 10; 493 hop_aroma = Math.round(hop_aroma * 1000 / 9) / 10;
494 if (hop_flavour > 100) 494 if (hop_flavour > 100)
495 hop_flavour = 100; 495 hop_flavour = 100;
496 if (hop_aroma > 100) 496 if (hop_aroma > 100)
497 hop_aroma = 100; 497 hop_aroma = 100;
498 console.log("calcIBUs(): " + total_ibus + " flavour: " + hop_flavour + " aroma: " + hop_aroma+" fermenter:"+ferm_ibus+" supplies:"+ok_hops); 498 console.log("calcIBUs(): " + total_ibus + " flavour: " + hop_flavour + " aroma: " + hop_aroma+" fermenter:"+ferm_ibus+" supplies:"+ok_hops);
4342 $("#est_color2").jqxNumberInput( Show0dec ); 4342 $("#est_color2").jqxNumberInput( Show0dec );
4343 $("#est_og2").jqxTooltip({ content: 'Het geschatte begin SG van dit product.' }); 4343 $("#est_og2").jqxTooltip({ content: 'Het geschatte begin SG van dit product.' });
4344 $("#est_og2").jqxNumberInput( Show3dec ); 4344 $("#est_og2").jqxNumberInput( Show3dec );
4345 $("#mash_kg").jqxTooltip({ content: 'Het gewicht van alle mouten in de maisch.' }); 4345 $("#mash_kg").jqxTooltip({ content: 'Het gewicht van alle mouten in de maisch.' });
4346 $("#mash_kg").jqxNumberInput( Show3dec ); 4346 $("#mash_kg").jqxNumberInput( Show3dec );
4347 $("#ferm_lintner").jqxTooltip({ content: 'De enzymkracht van alle mouten in de maisch. Moet hoger dan 35 zijn.' });
4348 $("#ferm_lintner").jqxNumberInput( Show0dec );
4349 $("#perc_malts").jqxProgressBar({ 4347 $("#perc_malts").jqxProgressBar({
4350 width: 300, 4348 width: 300,
4351 height: 23, 4349 height: 23,
4352 theme: theme, 4350 theme: theme,
4353 showText: true, 4351 showText: true,
4352 max: 120,
4354 animationDuration: 0, 4353 animationDuration: 0,
4355 colorRanges: [ 4354 colorRanges: [
4356 { stop: 90, color: '#008C00' }, 4355 { stop: 90, color: '#008C00' },
4357 { stop: 95, color: '#EB7331' }, 4356 { stop: 100, color: '#EB7331' },
4358 { stop: 100, color: '#FF0000' } 4357 { stop: 120, color: '#FF0000' }
4359 ] 4358 ],
4359 renderText: function (text) {
4360 return (Math.round(parseInt(text) * 1.2)) + '%';
4361 }
4360 }); 4362 });
4361 $("#perc_sugars").jqxProgressBar({ 4363 $("#perc_sugars").jqxProgressBar({
4362 width: 300, 4364 width: 300,
4363 height: 23, 4365 height: 23,
4364 theme: theme, 4366 theme: theme,
4365 showText: true, 4367 showText: true,
4368 max: 50,
4366 animationDuration: 0, 4369 animationDuration: 0,
4367 colorRanges: [ 4370 colorRanges: [
4368 { stop: 20, color: '#008C00' }, 4371 { stop: 20, color: '#008C00' },
4369 { stop: 100, color: '#FF0000' } 4372 { stop: 50, color: '#FF0000' }
4370 ] 4373 ],
4374 renderText: function (text) {
4375 return (Math.round(parseInt(text) * 5) / 10) + '%';
4376 }
4371 }); 4377 });
4372 $("#perc_cara").jqxProgressBar({ 4378 $("#perc_cara").jqxProgressBar({
4373 width: 300, 4379 width: 300,
4374 height: 23, 4380 height: 23,
4375 theme: theme, 4381 theme: theme,
4376 showText: true, 4382 showText: true,
4383 max: 50,
4377 animationDuration: 0, 4384 animationDuration: 0,
4378 colorRanges: [ 4385 colorRanges: [
4379 { stop: 25, color: '#008C00' }, 4386 { stop: 25, color: '#008C00' },
4380 { stop: 100, color: '#FF0000' } 4387 { stop: 50, color: '#FF0000' }
4381 ] 4388 ],
4389 renderText: function (text) {
4390 return (Math.round(parseInt(text) * 5) / 10) + '%';
4391 }
4392 });
4393 $("#ferm_lintner").jqxProgressBar({
4394 width: 300,
4395 height: 23,
4396 theme: theme,
4397 showText: true,
4398 max: 200,
4399 animationDuration: 0,
4400 colorRanges: [
4401 { stop: 30, color: '#FF0000' },
4402 { stop: 40, color: '#EB7331' },
4403 { stop: 200, color: '#008C00' }
4404 ],
4405 renderText: function (text) {
4406 return (parseInt(text) * 2) + ' lintner';
4407 }
4382 }); 4408 });
4383 $("#popupFermentable").jqxWindow({ 4409 $("#popupFermentable").jqxWindow({
4384 width: 800, 4410 width: 800,
4385 height: 300, 4411 height: 300,
4386 position: { x: 230, y: 100 }, 4412 position: { x: 230, y: 100 },
4591 { stop: 20, color: '#004D00' }, 4617 { stop: 20, color: '#004D00' },
4592 { stop: 40, color: '#008C00' }, 4618 { stop: 40, color: '#008C00' },
4593 { stop: 60, color: '#00BF00' }, 4619 { stop: 60, color: '#00BF00' },
4594 { stop: 80, color: '#00FF00' }, 4620 { stop: 80, color: '#00FF00' },
4595 { stop: 100, color: '#80FF80' } 4621 { stop: 100, color: '#80FF80' }
4596 ] 4622 ],
4623 renderText: function (text) {
4624 var val = parseInt(text);
4625 if (val < 20)
4626 return 'Weinig';
4627 else if (val < 40)
4628 return 'Matig';
4629 else if (val < 60)
4630 return 'Redelijk';
4631 else if (val < 80)
4632 return 'Veel';
4633 else
4634 return 'Zeer veel';
4635 }
4597 }); 4636 });
4598 $("#hop_aroma").jqxProgressBar({ 4637 $("#hop_aroma").jqxProgressBar({
4599 width: 300, height: 23, theme: theme, showText: true, 4638 width: 300, height: 23, theme: theme, showText: true,
4600 animationDuration: 0, 4639 animationDuration: 0,
4601 colorRanges: [ 4640 colorRanges: [
4602 { stop: 20, color: '#004D00' }, 4641 { stop: 20, color: '#004D00' },
4603 { stop: 40, color: '#008C00' }, 4642 { stop: 40, color: '#008C00' },
4604 { stop: 60, color: '#00BF00' }, 4643 { stop: 60, color: '#00BF00' },
4605 { stop: 80, color: '#00FF00' }, 4644 { stop: 80, color: '#00FF00' },
4606 { stop: 100, color: '#80FF80' } 4645 { stop: 100, color: '#80FF80' }
4607 ] 4646 ],
4647 renderText: function (text) {
4648 var val = parseInt(text);
4649 if (val < 20)
4650 return 'Weinig';
4651 else if (val < 40)
4652 return 'Matig';
4653 else if (val < 60)
4654 return 'Redelijk';
4655 else if (val < 80)
4656 return 'Veel';
4657 else
4658 return 'Zeer veel';
4659 }
4608 }); 4660 });
4609 $("#popupHop").jqxWindow({ 4661 $("#popupHop").jqxWindow({
4610 width: 800, 4662 width: 800,
4611 height: 300, 4663 height: 300,
4612 position: { x: 230, y: 100 }, 4664 position: { x: 230, y: 100 },

mercurial