www/js/rec_edit.js

changeset 72
93a0be4f5be3
parent 71
e1c50b21b7e3
child 73
454fc4558609
--- a/www/js/rec_edit.js	Thu Sep 27 23:13:41 2018 +0200
+++ b/www/js/rec_edit.js	Fri Sep 28 17:29:23 2018 +0200
@@ -56,8 +56,33 @@
 	// tooltips
 	$("#name").jqxTooltip({ content: 'De naam voor dit recept.' });
 	$("#notes").jqxTooltip({ content: 'De uitgebreide opmerkingen over dit recept.' });
+	$("#type").jqxTooltip({ content: 'Het brouw type van dit recept.' });
+	$("#est_og").jqxTooltip({ content: 'Het begin SG wat je wilt bereiken. De moutstort wordt automatisch herberekend.' });
+	$("#est_fg").jqxTooltip({ content: 'Het eind SG. Dit wordt automatisch berekend.' });
+	$("#est_color").jqxTooltip({ content: 'De kleur in EBC. Dit wordt automatisch berekend.' });
+	$("#est_ibu").jqxTooltip({ content: 'De bitterheid in IBU. Dit wordt automatisch berekend.' });
+	$("#est_abv").jqxTooltip({ content: 'Alcohol volume %. Dit wordt automatisch berekend.' });
+	$("#est_carb").jqxTooltip({ content: 'Koolzuur volume. Dit wordt automatisch berekend.' });
+
 	$("#st_name").jqxTooltip({ content: 'De bierstijl naam voor dit recept.'});
-	$("#type").jqxTooltip({ content: 'Het brouw type van dit recept.' });
+	$("#st_letter").jqxTooltip({ content: 'De bierstijl letter voor dit recept.'});
+	$("#st_guide").jqxTooltip({ content: 'De bierstijl gids voor dit recept.'});
+	$("#st_category").jqxTooltip({ content: 'De Amerikaanse bierstijl categorie.'});
+	$("#st_category_number").jqxTooltip({ content: 'De Amerikaanse bierstijl categorie sub nummer.'});
+	$("#st_type").jqxTooltip({ content: 'Het bierstijl type.'});
+	$("#st_og_min").jqxTooltip({ content: 'Het minimum begin SG voor deze bierstijl.'});
+	$("#st_og_max").jqxTooltip({ content: 'Het maximum begin SG voor deze bierstijl.'});
+	$("#st_fg_min").jqxTooltip({ content: 'Het minimum eind SG voor deze bierstijl.'});
+	$("#st_fg_max").jqxTooltip({ content: 'Het maximum eind SG voor deze bierstijl.'});
+	$("#st_color_min").jqxTooltip({ content: 'De minimum kleur voor deze bierstijl.'});
+	$("#st_color_max").jqxTooltip({ content: 'De maximum kleur voor deze bierstijl.'});
+	$("#st_ibu_min").jqxTooltip({ content: 'De minimum bitterheid voor deze bierstijl.'});
+	$("#st_ibu_max").jqxTooltip({ content: 'De maximum bitterheid voor deze bierstijl.'});
+	$("#st_abv_min").jqxTooltip({ content: 'Het minimum alcohol volume % voor deze bierstijl.'});
+	$("#st_abv_max").jqxTooltip({ content: 'Het maximum alcohol volume % voor deze bierstijl.'});
+	$("#st_carb_min").jqxTooltip({ content: 'Het minimum koolzuur volume voor deze bierstijl.'});
+	$("#st_carb_max").jqxTooltip({ content: 'Het maximum koolzuur volume voor deze bierstijl.'});
+
 	// prepare the data
 	var source = {
 		datatype: "json",
@@ -67,6 +92,9 @@
 			{ name: 'st_name', type: 'string' },
 			{ name: 'st_letter', type: 'string' },
 			{ name: 'st_guide', type: 'string' },
+			{ name: 'st_type', type: 'string' },
+			{ name: 'st_category', type: 'string' },
+			{ name: 'st_category_number', type: 'float' },
 			{ name: 'st_og_min', type: 'float' },
 			{ name: 'st_og_max', type: 'float' },
 			{ name: 'st_fg_min', type: 'float' },
@@ -87,10 +115,12 @@
 			{ name: 'efficiency', type: 'float' },
 			{ name: 'est_og', type: 'float' },
 			{ name: 'est_fg', type: 'float' },
+			{ name: 'est_abv', type: 'float' },
 			{ name: 'est_color', type: 'float' },
 			{ name: 'color_method', type: 'string' },
 			{ name: 'est_ibu', type: 'float' },
 			{ name: 'ibu_method', type: 'string' },
+			{ name: 'est_carb', type: 'float' },
 			{ name: 'mash_sparge_temp', type: 'float' },
 			{ name: 'mash_ph', type: 'float' },
 			{ name: 'mash_name', type: 'string' },
@@ -114,6 +144,9 @@
 			$("#st_name").val(dataRecord.st_name);
 			$("#st_letter").val(dataRecord.st_letter);
 			$("#st_guide").val(dataRecord.st_guide);
+			$("#st_category").val(dataRecord.st_category);
+			$("#st_category_number").val(dataRecord.st_category_number);
+			$("#st_type").val(dataRecord.st_type);
 			$("#type").val(dataRecord.type);
 			$("#batch_size").val(dataRecord.batch_size);
 			$("#boil_time").val(dataRecord.boil_time);
@@ -122,10 +155,22 @@
 			$("#st_og_min").val(dataRecord.st_og_min);
 			$("#st_og_max").val(dataRecord.st_og_max);
 			$("#est_fg").val(dataRecord.est_fg);
+			$("#st_fg_min").val(dataRecord.st_fg_min);
+			$("#st_fg_max").val(dataRecord.st_fg_max);
 			$("#est_color").val(dataRecord.est_color);
+			$("#est_abv").val(dataRecord.est_abv);
+			$("#st_abv_min").val(dataRecord.st_abv_min);
+			$("#st_abv_max").val(dataRecord.st_abv_max);
+			$("#st_color_min").val(dataRecord.st_color_min);
+			$("#st_color_max").val(dataRecord.st_color_max);
 			$("#color_method").val(dataRecord.color_method);
 			$("#est_ibu").val(dataRecord.est_ibu);
+			$("#st_ibu_min").val(dataRecord.st_ibu_min);
+			$("#st_ibu_max").val(dataRecord.st_ibu_max);
 			$("#ibu_method").val(dataRecord.ibu_method);
+			$("#est_carb").val(dataRecord.est_carb);
+			$("#st_carb_min").val(dataRecord.st_carb_min);
+			$("#st_carb_max").val(dataRecord.st_carb_max);
 			$("#mash_name").val(dataRecord.mash_name);
 			$("#mash_ph").val(dataRecord.mash_ph);
 			$("#mash_sparge_temp").val(dataRecord.mash_sparge_temp);
@@ -1036,18 +1081,40 @@
 	$("#st_name").jqxInput({ theme: theme, width: 250, height: 23 });
 	$("#st_letter").jqxInput({ theme: theme, width: 100, height: 23 });
 	$("#st_guide").jqxInput({ theme: theme, width: 250, height: 23 });
+	$("#st_category").jqxInput({ theme: theme, width: 250, height: 23 });
+	$("#st_category_number").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
+	$("#st_type").jqxInput({ theme: theme, width: 90, height: 23 });
 	$("#type").jqxDropDownList({ theme: theme, source: srcType, width: 125, height: 23, dropDownHeight: 95 });
 	$("#batch_size").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 4, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1, symbol: 'L', symbolPosition: 'right' });
-	$("#boil_time").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', template: "success", theme: theme, width: 100, height: 23, min: 4, max: 360, decimalDigits: 0, spinButtons: true });
+	$("#boil_time").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 4, max: 360, decimalDigits: 0, spinButtons: true });
 	$("#efficiency").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 40, max: 100, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right'  });
+
 	$("#est_og").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 1, max: 1.9, decimalDigits: 3, spinButtons: true, spinButtonsStep: 0.001 });
-	$("#st_og_min").jqxNumberInput({ disabled: true, inputMode: 'simple', width: 50, height: 23, decimalDigits: 3, readOnly: true });
+	$("#st_og_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true });
 	$("#st_og_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true });
-	$("#est_fg").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 100, height: 23, min: 0.980, max: 1.040, decimalDigits: 3, readOnly: true });
-	$("#est_color").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 1, max: 200, decimalDigits: 0, spinButtons: true });
+
+	$("#est_fg").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 100, height: 23, decimalDigits: 3, readOnly: true });
+	$("#st_fg_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true });
+	$("#st_fg_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true });
+
+	$("#est_abv").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true });
+	$("#st_abv_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true });
+	$("#st_abv_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true });
+
+	$("#est_color").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
+	$("#st_color_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
+	$("#st_color_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
 	$("#color_method").jqxDropDownList({ theme: theme, source: srcColor, width: 125, height: 23, dropDownHeight: 95 });
-	$("#est_ibu").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 0, max: 200, decimalDigits: 0, spinButtons: true });
+
+	$("#est_ibu").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
+	$("#st_ibu_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
+	$("#st_ibu_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true });
 	$("#ibu_method").jqxDropDownList({ theme: theme, source: srcIBU, width: 125, height: 23, dropDownHeight: 180 });
+
+	$("#est_carb").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true });
+	$("#st_carb_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true });
+	$("#st_carb_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true });
+
 	$("#mash_name").jqxInput({ theme: theme, width: 320, height: 23 });
 	$("#mash_ph").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 4, max: 8, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
 	$("#mash_sparge_temp").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 70, max: 98, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 });
@@ -1103,6 +1170,9 @@
 			st_name: $('#st_name').val(),
 			st_letter: $('#st_letter').val(),
 			st_guide: $('#st_guide').val(),
+			st_type: $('#st_type').val(),
+			st_category: $('#st_category').val(),
+			st_category_number: parseFloat($("#st_category_number").jqxNumberInput('decimal')),
 			st_og_min: dataRecord.st_og_min,
 			st_og_max: dataRecord.st_og_max,
 			st_fg_min: dataRecord.st_fg_min,
@@ -1121,10 +1191,12 @@
 			efficiency: parseFloat($("#efficiency").jqxNumberInput('decimal')),
 			est_og: parseFloat($("#est_og").jqxNumberInput('decimal')),
 			est_fg: parseFloat($("#est_fg").jqxNumberInput('decimal')),
+			est_abv: parseFloat($("#est_abv").jqxNumberInput('decimal')),
 			est_color: parseFloat($("#est_color").jqxNumberInput('decimal')),
 			color_method: $("#color_method").val(),
 			est_ibu: parseFloat($("#est_ibu").jqxNumberInput('decimal')),
 			ibu_method: $("#ibu_method").val(),
+			est_carb: parseFloat($("#est_carb").jqxNumberInput('decimal')),
 			mash_name: $("#mash_name").val(),
 			mash_ph: parseFloat($("#mash_ph").jqxNumberInput('decimal')),
 			mash_sparge_temp: parseFloat($("#mash_sparge_temp").jqxNumberInput('decimal')),

mercurial