www/js/rec_edit.js

changeset 381
0ec81755396e
parent 380
2242521067a7
child 382
547c23b50d00
equal deleted inserted replaced
380:2242521067a7 381:0ec81755396e
360 row.h_useat, parseFloat(row.h_amount)); 360 row.h_useat, parseFloat(row.h_amount));
361 hop_aroma += hopAromaContribution(parseFloat(row.h_time), parseFloat(dataRecord.batch_size), 361 hop_aroma += hopAromaContribution(parseFloat(row.h_time), parseFloat(dataRecord.batch_size),
362 row.h_useat, parseFloat(row.h_amount)); 362 row.h_useat, parseFloat(row.h_amount));
363 } 363 }
364 total_ibus = Math.round(total_ibus * 10) / 10; 364 total_ibus = Math.round(total_ibus * 10) / 10;
365 hop_flavour = Math.round(hop_flavour * 100) / 10; 365 hop_flavour = Math.round(hop_flavour * 1000 / 7.5) / 10;
366 hop_aroma = Math.round(hop_aroma * 100) / 10; 366 hop_aroma = Math.round(hop_aroma * 1000 / 9) / 10;
367 if (hop_flavour > 100) 367 if (hop_flavour > 100)
368 hop_flavour = 100; 368 hop_flavour = 100;
369 if (hop_aroma > 100) 369 if (hop_aroma > 100)
370 hop_aroma = 100; 370 hop_aroma = 100;
371 console.log("calcIBUs(): " + total_ibus + " flavour: " + hop_flavour + " aroma: " + hop_aroma); 371 console.log("calcIBUs(): " + total_ibus + " flavour: " + hop_flavour + " aroma: " + hop_aroma);
2811 // Tab 2, Vergistbaar 2811 // Tab 2, Vergistbaar
2812 $("#est_color2").jqxTooltip({ content: 'De kleur in EBC. Dit wordt automatisch berekend.' }); 2812 $("#est_color2").jqxTooltip({ content: 'De kleur in EBC. Dit wordt automatisch berekend.' });
2813 $("#est_color2").jqxNumberInput( Show0dec ); 2813 $("#est_color2").jqxNumberInput( Show0dec );
2814 $("#est_og2").jqxTooltip({ content: 'Het begin SG wat je wilt bereiken. De moutstort wordt automatisch herberekend.' }); 2814 $("#est_og2").jqxTooltip({ content: 'Het begin SG wat je wilt bereiken. De moutstort wordt automatisch herberekend.' });
2815 $("#est_og2").jqxNumberInput( Show3dec ); 2815 $("#est_og2").jqxNumberInput( Show3dec );
2816 $("#ferm_lintner").jqxTooltip({ content: 'De enzymkracht van alle mouten in de maisch. Moet hoger dan 35 zijn.' });
2817 $("#ferm_lintner").jqxNumberInput( Show0dec );
2818 $("#perc_malts").jqxProgressBar({ 2816 $("#perc_malts").jqxProgressBar({
2819 width: 300, 2817 width: 300,
2820 height: 23, 2818 height: 23,
2821 theme: theme, 2819 theme: theme,
2822 showText: true, 2820 showText: true,
2821 max: 120,
2823 animationDuration: 0, 2822 animationDuration: 0,
2824 colorRanges: [ 2823 colorRanges: [
2825 { stop: 90, color: '#008C00' }, 2824 { stop: 90, color: '#008C00' },
2826 { stop: 95, color: '#EB7331' }, 2825 { stop: 100, color: '#EB7331' },
2827 { stop: 100, color: '#FF0000' } 2826 { stop: 120, color: '#FF0000' }
2828 ] 2827 ],
2828 renderText: function (text) {
2829 return (Math.round(parseInt(text) * 1.2)) + '%';
2830 }
2829 }); 2831 });
2830 $("#perc_sugars").jqxProgressBar({ 2832 $("#perc_sugars").jqxProgressBar({
2831 width: 300, 2833 width: 300,
2832 height: 23, 2834 height: 23,
2833 theme: theme, 2835 theme: theme,
2834 showText: true, 2836 showText: true,
2837 max: 50,
2835 animationDuration: 0, 2838 animationDuration: 0,
2836 colorRanges: [ 2839 colorRanges: [
2837 { stop: 20, color: '#008C00' }, 2840 { stop: 20, color: '#008C00' },
2838 { stop: 100, color: '#FF0000' } 2841 { stop: 50, color: '#FF0000' }
2839 ] 2842 ],
2843 renderText: function (text) {
2844 return (Math.round(parseInt(text) * 5) / 10) + '%';
2845 }
2840 }); 2846 });
2841 $("#perc_cara").jqxProgressBar({ 2847 $("#perc_cara").jqxProgressBar({
2842 width: 300, 2848 width: 300,
2843 height: 23, 2849 height: 23,
2844 theme: theme, 2850 theme: theme,
2845 showText: true, 2851 showText: true,
2852 max: 50,
2846 animationDuration: 0, 2853 animationDuration: 0,
2847 colorRanges: [ 2854 colorRanges: [
2848 { stop: 25, color: '#008C00' }, 2855 { stop: 25, color: '#008C00' },
2849 { stop: 100, color: '#FF0000' } 2856 { stop: 50, color: '#FF0000' }
2850 ] 2857 ],
2851 }); 2858 renderText: function (text) {
2859 return (Math.round(parseInt(text) * 5) / 10) + '%';
2860 }
2861 });
2862 $("#ferm_lintner").jqxProgressBar({
2863 width: 300,
2864 height: 23,
2865 theme: theme,
2866 showText: true,
2867 max: 200,
2868 animationDuration: 0,
2869 colorRanges: [
2870 { stop: 30, color: '#FF0000' },
2871 { stop: 40, color: '#EB7331' },
2872 { stop: 200, color: '#008C00' }
2873 ],
2874 renderText: function (text) {
2875 return (parseInt(text) * 2) + ' lintner';
2876 }
2877 });
2852 $("#popupFermentable").jqxWindow({ 2878 $("#popupFermentable").jqxWindow({
2853 width: 800, 2879 width: 800,
2854 height: 300, 2880 height: 300,
2855 position: { x: 230, y: 100 }, 2881 position: { x: 230, y: 100 },
2856 resizable: false, 2882 resizable: false,
3058 { stop: 20, color: '#004D00' }, 3084 { stop: 20, color: '#004D00' },
3059 { stop: 40, color: '#008C00' }, 3085 { stop: 40, color: '#008C00' },
3060 { stop: 60, color: '#00BF00' }, 3086 { stop: 60, color: '#00BF00' },
3061 { stop: 80, color: '#00FF00' }, 3087 { stop: 80, color: '#00FF00' },
3062 { stop: 100, color: '#80FF80' } 3088 { stop: 100, color: '#80FF80' }
3063 ] 3089 ],
3090 renderText: function (text) {
3091 var val = parseInt(text);
3092 if (val < 20)
3093 return 'Weinig';
3094 else if (val < 40)
3095 return 'Matig';
3096 else if (val < 60)
3097 return 'Redelijk';
3098 else if (val < 80)
3099 return 'Veel';
3100 else
3101 return 'Zeer veel';
3102 }
3064 }); 3103 });
3065 $("#hop_aroma").jqxProgressBar({ 3104 $("#hop_aroma").jqxProgressBar({
3066 width: 300, 3105 width: 300,
3067 height: 23, 3106 height: 23,
3068 theme: theme, 3107 theme: theme,
3072 { stop: 20, color: '#004D00' }, 3111 { stop: 20, color: '#004D00' },
3073 { stop: 40, color: '#008C00' }, 3112 { stop: 40, color: '#008C00' },
3074 { stop: 60, color: '#00BF00' }, 3113 { stop: 60, color: '#00BF00' },
3075 { stop: 80, color: '#00FF00' }, 3114 { stop: 80, color: '#00FF00' },
3076 { stop: 100, color: '#80FF80' } 3115 { stop: 100, color: '#80FF80' }
3077 ] 3116 ],
3117 renderText: function (text) {
3118 var val = parseInt(text);
3119 if (val < 20)
3120 return 'Weinig';
3121 else if (val < 40)
3122 return 'Matig';
3123 else if (val < 60)
3124 return 'Redelijk';
3125 else if (val < 80)
3126 return 'Veel';
3127 else
3128 return 'Zeer veel';
3129 }
3078 }); 3130 });
3079 $("#popupHop").jqxWindow({ 3131 $("#popupHop").jqxWindow({
3080 width: 800, 3132 width: 800,
3081 height: 300, 3133 height: 300,
3082 position: { x: 230, y: 100 }, 3134 position: { x: 230, y: 100 },

mercurial