# HG changeset patch # User Michiel Broek # Date 1659816162 -7200 # Node ID 21fae4d2203e9f1b92e7dc19a9f48735efad4b00 # Parent 8f3936eef7394eed1d7d1863d7205edf7ffff481 Final code cleanup in product editor. diff -r 8f3936eef739 -r 21fae4d2203e www/js/prod_edit.js --- a/www/js/prod_edit.js Sat Aug 06 21:21:21 2022 +0200 +++ b/www/js/prod_edit.js Sat Aug 06 22:02:42 2022 +0200 @@ -21,30 +21,6 @@ *****************************************************************************/ -function createPopupElements() { - - $('#volumeWindow').jqxWindow({ - theme: theme, - position: { x: 380, y: 210 }, - width: 500, - height: 200, - resizable: false, - isModal: true, - modalOpacity: 0.4, - autoOpen: false, - cancelButton: $('#volumeReady') - }); - -} - - - -function drop_endis(flag, item, index) { - (flag) ? $(item).jqxDropDownList('disableAt', index) : $(item).jqxDropDownList('enableAt', index); -} - - - function block_fermentable(stage, added) { if (stage > 5 && added < 4) // After fermentation and added before packaging return true; @@ -55,29 +31,6 @@ return false; } - - -function minimum_fermentable(stage, added) { - if (stage > 5 && added < 4) - return 4; - if (stage > 3 && added < 3) - return 3; - if (stage > 2 && added < 2) - return 2; - return added; -} - - - -function minimum_hop(stage, useat) -{ - if (stage > 2 && useat < 5) - return 5; - return useat; -} - - - function block_hop(stage, useat) { if (stage > 2 && useat < 5) @@ -85,8 +38,6 @@ return false; } - - function block_misc(stage, use_use) { if (stage > 5 && use_use < 5) return true; @@ -99,22 +50,6 @@ return false; } - - -function minimum_misc(stage, use_use) { - if (stage > 5 && use_use < 5) - return 5; - if (stage > 3 && use_use < 4) - return 4; - if (stage > 2 && use_use < 3) - return 3; - if (stage > 1 && use_use < 1) - return 1; - return use_use; -} - - - function block_yeast(stage, use) { if (stage > 3 && use < 1) return true; @@ -128,21 +63,6 @@ } - -function minimum_yeast(stage, use) { - if (stage > 3 && use < 1) - return 1; - if (stage > 4 && use < 2) - return 2; - if (stage > 5 && use < 3) - return 3; - if (stage > 6 && use < 4) - return 4; - return use; -} - - - $(document).ready(function() { var i, @@ -1226,7 +1146,6 @@ var a = last_temp * (dataRecord.eq_tun_weight * dataRecord.eq_tun_specific_heat + step_infused * SpecificHeatWater + step_mashkg * SpecificHeatMalt); var b = step_temp * (dataRecord.eq_tun_weight * dataRecord.eq_tun_specific_heat + step_infused * SpecificHeatWater + step_mashkg * SpecificHeatMalt); var vol = Round(((b - a) / ((infuse_temp - step_temp) * SpecificHeatWater)), 2); - //console.log('infusionVol(' + step_infused + ', ' + step_mashkg + ', ' + infuse_temp + ', ' + step_temp + ', ' + last_temp + '): ' + vol); return vol; } @@ -1236,7 +1155,6 @@ var vol = 0; if (b > 0) vol = Round(a / b, 6); - console.log('decoctionVol(' + step_volume + ', ' + step_temp + ', ' + prev_temp + '): ' + vol); return vol; } @@ -1310,32 +1228,6 @@ $('#ok_supplies').html(""); } - function calcPercentages() { - - console.log('calcPercentages()'); - var tw = 0, rowdata, percentage, rowscount = dataRecord.fermentables.length; - if (rowscount > 1) { - for (i = 0; i < rowscount; i++) { - rowdata = dataRecord.fermentables[i]; - if (rowdata.f_added < 4) - tw += Round(rowdata.f_amount, 3); - } - tw = Round(tw, 3); - - for (i = 0; i < rowscount; i++) { - rowdata = $('#fermentableGrid').jqxGrid('getrowdata', i); - if (rowdata.f_added < 4) { - percentage = Round(rowdata.f_amount / tw * 100, 1); - $('#fermentableGrid').jqxGrid('setcellvalue', i, 'f_percentage', percentage); - } else { - $('#fermentableGrid').jqxGrid('setcellvalue', i, 'f_percentage', 0); - } - } - } else { - $('#fermentableGrid').jqxGrid('setcellvalue', 0, 'f_percentage', 100); - } - } - /* * All calculations that depend on changes in the fermentables, * volumes and equipments. @@ -3412,7 +3304,5 @@ $('#Terug').bind('click', function() { window.location.href = my_return; }); - - createPopupElements(); }); diff -r 8f3936eef739 -r 21fae4d2203e www/prod_edit.php --- a/www/prod_edit.php Sat Aug 06 21:21:21 2022 +0200 +++ b/www/prod_edit.php Sat Aug 06 22:02:42 2022 +0200 @@ -926,29 +926,6 @@ -
-
Bereken volume in de ketel
-
- - - - - - - - - - - - - - -
Ketel volume:
cm vanaf de bovenrand:
- -
-
-
-