www/js/prod_edit.js

changeset 122
5d5bcab19b8f
parent 121
875aeb365e1c
child 123
b4aaf52941e9
--- a/www/js/prod_edit.js	Wed Dec 05 14:43:15 2018 +0100
+++ b/www/js/prod_edit.js	Wed Dec 05 15:25:55 2018 +0100
@@ -198,23 +198,23 @@
 			$("#eq_boil_size").val(datarecord.boil_size);
 			$("#eq_batch_size").val(datarecord.batch_size);
 			$("#eq_tun_volume").val(datarecord.tun_volume);
-			$("#eq_tun_weight").val(datarecord.tun_weight);
-			$("#eq_tun_specific_heat").val(datarecord.tun_specific_heat);
-			$("#eq_tun_material").val(datarecord.tun_material);
-			$("#eq_tun_height").val(datarecord.tun_height);
+			dataRecord.eq_tun_weight = datarecord.tun_weight;
+			dataRecord.eq_tun_specific_heat = datarecord.tun_specific_heat;
+			dataRecord.eq_tun_material = datarecord.tun_material;
+			dataRecord.eq_tun_height = datarecord.tun_height;
 			$("#eq_top_up_water").val(datarecord.top_up_water);
 			$("#eq_trub_chiller_loss").val(datarecord.trub_chiller_loss);
 			$("#eq_evap_rate").val(datarecord.evap_rate);
 			$("#eq_boil_time").val(datarecord.boil_time);
-			$("#eq_calc_boil_volume").val(datarecord.calc_boil_volume);
+			dataRecord.eq_calc_boil_volume = datarecord.calc_boil_volume;
 			$("#eq_top_up_kettle").val(datarecord.top_up_kettle);
 			$("#eq_hop_utilization").val(datarecord.hop_utilization);
 			$("#eq_notes").val(datarecord.notes);
 			$("#eq_lauter_volume").val(datarecord.lauter_volume);
-			$("#eq_lauter_height").val(datarecord.lauter_height);
+			dataRecord.eq_lauter_height = datarecord.lauter_height;
 			$("#eq_lauter_deadspace").val(datarecord.lauter_deadspace);
 			$("#eq_kettle_volume").val(datarecord.kettle_volume);
-			$("#eq_kettle_height").val(datarecord.kettle_height);
+			dataRecord.eq_kettle_height = datarecord.kettle_height;
 			$("#eq_mash_volume").val(datarecord.mash_volume);
 			$("#eq_efficiency").val(datarecord.efficiency);
 		}
@@ -231,16 +231,11 @@
 	$("#eq_name").jqxTooltip({ content: 'De naam van deze brouw apparatuur.' });
 	$("#eq_notes").jqxTooltip({ content: 'Opmerkingen over deze apparatuur.' });
 	$("#eq_tun_volume").jqxTooltip({ content: 'Maisch ketel volume.' });
-	$("#eq_tun_height").jqxTooltip({ content: 'Maisch ketel hoogte in cm.' });
-	$("#eq_tun_weight").jqxTooltip({ content: 'Maisch ketel gewicht in Kg.' });
-	$("#eq_tun_material").jqxTooltip({ content: 'Maisch ketel materiaal. Nodig om de juiste inmaisch temperatuur te berekenen.' });
 	$("#eq_mash_volume").jqxTooltip({ content: 'Maisch water voor de eerste stap.' });
 	$("#eq_lauter_volume").jqxTooltip({ content: 'Filterkuip volume.' });
-	$("#eq_lauter_height").jqxTooltip({ content: 'Hoogte van de filterkuip in cm.' });
 	$("#eq_lauter_deadspace").jqxTooltip({ content: 'Filterkuip verlies in liters.' });
 	$("#eq_efficiency").jqxTooltip({ content: 'Gemiddeld brouwzaal rendement.' });
 	$("#eq_kettle_volume").jqxTooltip({ content: 'Kook ketel volume in liters.' });
-	$("#eq_kettle_height").jqxTooltip({ content: 'Kook ketel hoogte in cm.' });
 	$("#eq_boil_size").jqxTooltip({ content: 'Normaal kook volume in liters' });
 	$("#eq_evap_rate").jqxTooltip({ content: 'Verdamping in liters per uur.' });
 	$("#eq_boil_time").jqxTooltip({ content: 'Normale kooktijd in minuten..' });
@@ -419,22 +414,15 @@
 			$("#eq_boil_size").val(dataRecord.eq_boil_size);
 			$("#eq_batch_size").val(dataRecord.eq_batch_size);
 			$("#eq_tun_volume").val(dataRecord.eq_tun_volume);
-			$("#eq_tun_weight").val(dataRecord.eq_tun_weight);
-			$("#eq_tun_specific_heat").val(dataRecord.eq_tun_specific_heat);
-			$("#eq_tun_material").val(dataRecord.eq_tun_material);
-			$("#eq_tun_height").val(dataRecord.eq_tun_height);
 			$("#eq_top_up_water").val(dataRecord.eq_top_up_water);
 			$("#eq_trub_chiller_loss").val(dataRecord.eq_trub_chiller_loss);
 			$("#eq_evap_rate").val(dataRecord.eq_evap_rate);
 			$("#eq_boil_time").val(dataRecord.eq_boil_time);
-			$("#eq_calc_boil_volume").val(dataRecord.eq_calc_boil_volume);
 			$("#eq_top_up_kettle").val(dataRecord.eq_top_up_kettle);
 			$("#eq_hop_utilization").val(dataRecord.eq_hop_utilization);
 			$("#eq_lauter_volume").val(dataRecord.eq_lauter_volume);
-			$("#eq_lauter_height").val(dataRecord.eq_lauter_height);
 			$("#eq_lauter_deadspace").val(dataRecord.eq_lauter_deadspace);
 			$("#eq_kettle_volume").val(dataRecord.eq_kettle_volume);
-			$("#eq_kettle_height").val(dataRecord.eq_kettle_height);
 			$("#eq_mash_volume").val(dataRecord.eq_mash_volume);
 			$("#eq_efficiency").val(dataRecord.eq_efficiency);
 			// Brewdate
@@ -571,7 +559,7 @@
 	$("#inventory_reduced").jqxCheckBox({ theme: theme, width: 120, height: 23 });
 	$('#inventory_reduced').on('checked', function (event) {
 		// Call a script to do the work and block this.
-		// Note that this script must set this flag too, so of the user doesn't Save it is still set.
+		// Note that this script must set this flag too, so if the user doesn't Save it is still set.
 		// Call the script with the uuid.
 		$("#inventory_reduced").jqxCheckBox({ disabled : true });
 	});
@@ -592,23 +580,16 @@
 	$("#eq_boil_size").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
 	$("#eq_batch_size").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
 	$("#eq_tun_volume").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
-	$("#eq_tun_weight").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 2 });
-	$("#eq_tun_specific_heat").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 3 });
-	$("#eq_tun_material").jqxInput({ theme: theme, width: 100, height: 23 });
-	$("#eq_tun_height").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
 	$("#eq_top_up_water").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
 	$("#eq_trub_chiller_loss").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
 	$("#eq_evap_rate").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 2,  });
 	$("#eq_boil_time").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 0 });
-	$("#eq_calc_boil_volume").jqxCheckBox({ theme: theme, width: 120, height: 23 });
 	$("#eq_top_up_kettle").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
 	$("#eq_hop_utilization").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 0 });
-	$("#eq_notes").jqxInput({ theme: theme, width: 640, height: 100 });
+	$("#eq_notes").jqxInput({ theme: theme, width: 800, height: 100 });
 	$("#eq_lauter_volume").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
-	$("#eq_lauter_height").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
 	$("#eq_lauter_deadspace").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
 	$("#eq_kettle_volume").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
-	$("#eq_kettle_height").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
 	$("#eq_mash_volume").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
 	$("#eq_efficiency").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 1 });
 	// Brewday
@@ -716,23 +697,23 @@
 			eq_boil_size: parseFloat($("#eq_boil_size").jqxNumberInput('decimal')),
 			eq_batch_size: parseFloat($("#eq_batch_size").jqxNumberInput('decimal')),
 			eq_tun_volume: parseFloat($("#eq_tun_volume").jqxNumberInput('decimal')),
-			eq_tun_weight: parseFloat($("#eq_tun_weight").jqxNumberInput('decimal')),
-			eq_tun_specific_heat: parseFloat($("#eq_tun_specific_heat").jqxNumberInput('decimal')),
-			eq_tun_material: $("#eq_tun_material").val(),
-			eq_tun_height: parseFloat($("#eq_tun_height").jqxNumberInput('decimal')),
+			eq_tun_weight: dataRecord.eq_tun_weight,
+			eq_tun_specific_heat: dataRecord.eq_tun_specific_heat,
+			eq_tun_material: dataRecord.eq_tun_material,
+			eq_tun_height: dataRecord.eq_tun_height,
 			eq_top_up_water: parseFloat($("#eq_top_up_water").jqxNumberInput('decimal')),
 			eq_trub_chiller_loss: parseFloat($("#eq_trub_chiller_loss").jqxNumberInput('decimal')),
 			eq_evap_rate: parseFloat($("#eq_evap_rate").jqxNumberInput('decimal')),
 			eq_boil_time: parseFloat($("#eq_boil_time").jqxNumberInput('decimal')),
-			eq_calc_boil_volume: $("#eq_calc_boil_volume").val(),
+			eq_calc_boil_volume: dataRecord.eq_calc_boil_volume,
 			eq_top_up_kettle: parseFloat($("#eq_top_up_kettle").jqxNumberInput('decimal')),
 			eq_hop_utilization: parseFloat($("#eq_hop_utilization").jqxNumberInput('decimal')),
 			eq_notes: $("#eq_notes").val(),
 			eq_lauter_volume: parseFloat($("#eq_lauter_volume").jqxNumberInput('decimal')),
-			eq_lauter_height: parseFloat($("#eq_lauter_height").jqxNumberInput('decimal')),
+			eq_lauter_height: dataRecord.eq_lauter_height,
 			eq_lauter_deadspace: parseFloat($("#eq_lauter_deadspace").jqxNumberInput('decimal')),
 			eq_kettle_volume: parseFloat($("#eq_kettle_volume").jqxNumberInput('decimal')),
-			eq_kettle_height: parseFloat($("#eq_kettle_height").jqxNumberInput('decimal')),
+			eq_kettle_height: dataRecord.eq_kettle_height,
 			eq_mash_volume: parseFloat($("#eq_mash_volume").jqxNumberInput('decimal')),
 			eq_efficiency: parseFloat($("#eq_efficiency").jqxNumberInput('decimal'))
 		};

mercurial