Global setup switched to dropdown indexes.

Sun, 27 Jan 2019 21:17:48 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 27 Jan 2019 21:17:48 +0100
changeset 218
38499e3859fa
parent 217
318aab371497
child 219
4c21eabb3c0e

Global setup switched to dropdown indexes.

README.design file | annotate | diff | comparison | revisions
www/js/profile_setup.js file | annotate | diff | comparison | revisions
www/profile_setup.php file | annotate | diff | comparison | revisions
--- a/README.design	Sun Jan 27 20:40:24 2019 +0100
+++ b/README.design	Sun Jan 27 21:17:48 2019 +0100
@@ -42,7 +42,7 @@
 inventory_yeasts		Ok.	Ok.		Ok.	Ok.	Ok.	Ok.
 profile_fermentation		Ok.	Ok.		Ok.	Ok.	Ok.	Ok.
 profile_mash                    Ok.     Ok.		Ok.	Ok.	Ok.	Ok.
-profile_setup			Ok.	Ok.			Ok.
+profile_setup			Ok.	Ok.		Ok.	Ok.	Ok.	Ok.
 profile_styles                  Ok.     Ok.		Ok.	Ok.	Ok.	Ok.
 profile_water                   Ok.     Ok.		Ok.	Ok.	Ok.	Ok.
 recipes
--- a/www/js/profile_setup.js	Sun Jan 27 20:40:24 2019 +0100
+++ b/www/js/profile_setup.js	Sun Jan 27 21:17:48 2019 +0100
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * Copyright (C) 2018
+ * Copyright (C) 2019
  *
  * Michiel Broek <mbroek at mbse dot eu>
  *
@@ -59,8 +59,8 @@
 			{ name: 'factor_fwh', type: 'number' },
 			{ name: 'factor_pellet', type: 'number' },
 			{ name: 'factor_plug', type: 'number' },
-			{ name: 'ibu_method', type: 'string' },
-			{ name: 'color_method', type: 'string' },
+			{ name: 'ibu_method', type: 'int' },
+			{ name: 'color_method', type: 'int' },
 			{ name: 'brix_correction', type: 'float' },
 			{ name: 'grain_absorbtion', type: 'float' },
 			{ name: 'default_water', type: 'string' }
@@ -90,17 +90,29 @@
 	dataAdapter.dataBind();
 
 	// Editers
-	var srcColor = [ "Morey", "Mosher", "Daniels" ];
-	var srcIBU = [ "Tinseth", "Rager", "Daniels" ]; // Only these are supported at this time.
 	$("#brewery_name").jqxInput({ theme: theme, width: 640, height: 23 });
-	$("#factor_fwh").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: -50, max: 50, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right'  });
-	$("#factor_mashhop").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: -50, max: 50, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right'  });
-	$("#factor_pellet").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 0, max: 20, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right'  });
-	$("#factor_plug").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 0, max: 20, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right'  });
-	$("#brix_correction").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 1.00, max: 1.05, decimalDigits: 2, spinButtons: true, spinButtonsStep: 0.01 });
-	$("#grain_absorbtion").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 0.5, max: 1.1, decimalDigits: 2, spinButtons: true, spinButtonsStep: 0.01 });
-	$("#color_method").jqxDropDownList({ theme: theme, source: srcColor, width: 125, height: 23, dropDownHeight: 95 });
-	$("#ibu_method").jqxDropDownList({ theme: theme, source: srcIBU, width: 125, height: 23, dropDownHeight: 95 });
+	$("#factor_fwh").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: -50, max: 50, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right'  });
+	$("#factor_mashhop").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: -50, max: 50, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right'  });
+	$("#factor_pellet").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 20, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right'  });
+	$("#factor_plug").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 20, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right'  });
+	$("#brix_correction").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 1.00, max: 1.05, decimalDigits: 2, spinButtons: true, spinButtonsStep: 0.01 });
+	$("#grain_absorbtion").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0.5, max: 1.1, decimalDigits: 2, spinButtons: true, spinButtonsStep: 0.01 });
+	$("#color_method").jqxDropDownList({
+		theme: theme,
+		source: ColorMethodAdapter,
+		valueMember: 'id',
+		displayMember: 'nl',
+		width: 180,
+		autoDropDownHeight: true
+	});
+	$("#ibu_method").jqxDropDownList({
+		theme: theme,
+		source: IBUmethodAdapter,
+		valueMember: 'id',
+		displayMember: 'nl',
+		width: 180,
+		autoDropDownHeight: true
+	});
 	$('#default_water').jqxDropDownList({
 		placeHolder: "Kies water:",
 		theme: theme,
@@ -108,9 +120,9 @@
 		valueMember: "name",
 		displayMember: "name",
 		width: 250,
-		height: 27,
 		dropDownHorizontalAlignment: 'right',
-		dropDownWidth: 300
+		dropDownWidth: 300,
+		autoDropDownHeight: true
 	});
 	$('#default_water').jqxDropDownList( 'selectItem', dataRecord.default_water );
 
--- a/www/profile_setup.php	Sun Jan 27 20:40:24 2019 +0100
+++ b/www/profile_setup.php	Sun Jan 27 21:17:48 2019 +0100
@@ -44,7 +44,7 @@
       </tr>
      </table>
      <div style="float: right; margin-top: 330px; margin-bottom: 10px;">
-      <input style="margin-right: 595px;" type="button" id="Save"   value="Save" />
+      <input style="margin-right: 595px;" type="button" id="Save"   value="Sla op" />
      </div>
     </div>
    </div>

mercurial