Code cleanup

Mon, 11 Feb 2019 20:41:29 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Mon, 11 Feb 2019 20:41:29 +0100
changeset 269
25696a91b395
parent 268
eb35aa378579
child 270
cf4b4b63eb36

Code cleanup

www/js/inv_fermentables.js file | annotate | diff | comparison | revisions
www/js/inv_hops.js file | annotate | diff | comparison | revisions
www/js/inv_miscs.js file | annotate | diff | comparison | revisions
www/js/inv_yeasts.js file | annotate | diff | comparison | revisions
--- a/www/js/inv_fermentables.js	Mon Feb 11 20:03:21 2019 +0100
+++ b/www/js/inv_fermentables.js	Mon Feb 11 20:41:29 2019 +0100
@@ -172,7 +172,7 @@
 	});
 	$("#always_on_stock").jqxCheckBox({ theme: theme, width: 120, height: 23 });
 	$("#di_ph").jqxNumberInput( Spin2pH );
-	$("#acid_to_ph_57").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: -1000, max: 1000, decimalDigits: 2, spinButtons: true, spinButtonsStep: 0.01 });
+	$("#acid_to_ph_57").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 110, height: 23, min: -1000, max: 1000, decimalDigits: 4, spinButtons: true });
 	$("#graintype").jqxDropDownList({
 		theme: theme,
 		source: GrainTypeAdapter,
@@ -186,8 +186,7 @@
 	$("#production_date").jqxDateTimeInput( Dateopts );
 	$("#cost").jqxNumberInput( Spin2dec );
 	$("#tht_date").jqxDateTimeInput( Dateopts );
-	$("#totval").jqxNumberInput( Spin2dec );
-	$("#totval").jqxNumberInput({ width: 90, readOnly: true, spinButtons: false });
+	$("#totval").jqxNumberInput( Show2dec );
 
 	var dataAdapter = new $.jqx.dataAdapter(source);
 	var editrow = -1;
@@ -242,22 +241,11 @@
 			{ text: 'Herkomst', datafield: 'origin', width: 150 },
 			{ text: 'Producent', datafield: 'supplier', width: 140 },
 			{ text: 'Vergistbaar product', datafield: 'name', menu: false },
-			{ text: 'Soort', width: 135, filtertype: 'list', /*filteritems: FermentableTypeAdapter, displayfield: 'nl',*/ datafield: 'type',
+			{ text: 'Soort', width: 135, filtertype: 'list', datafield: 'type',
 			  cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) {
 				  return "<div style='margin: 4px;' class='jqx-center-align'>" + FermentableTypeData[rowdata.type].nl + "</div>";
 			  },
-//	  		  createfilterwidget: function (column, htmlElement, editor) {
-//				editor.jqxDropDownList({ displayMember: "nl", valueMember: "id" });
-//			  }
-//			  createfilterwidget: function (column, columnElement, widget) {
-//				  widget.jqxDropDownList({ dropDownWidth: 350 });
-//			  }
 			},
-//			{ text: 'Soort', datafield: 'type', align: 'center', cellsalign: 'center', width: 135,
-//			  cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) {
-//				return "<div style='margin: 4px;' class='jqx-center-align'>" + FermentableTypeData[value].nl + "</div>";
-//			  },
-//		       	},
 			{ text: 'Graan type', datafield: 'graintype', align: 'center', cellsalign: 'center', width: 125,
 			  cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) {
 				return "<div style='margin: 4px;' class='jqx-center-align'>" + GrainTypeData[value].nl + "</div>";
--- a/www/js/inv_hops.js	Mon Feb 11 20:03:21 2019 +0100
+++ b/www/js/inv_hops.js	Mon Feb 11 20:41:29 2019 +0100
@@ -169,8 +169,7 @@
 	$("#cost").jqxNumberInput( Spin2dec );
 	$("#tht_date").jqxDateTimeInput( Dateopts );
 	$("#total_oil").jqxNumberInput( Perc1dec );
-	$("#totval").jqxNumberInput( Spin2dec );
-	$("#totval").jqxNumberInput({ width: 90, readOnly: true, spinButtons: false });
+	$("#totval").jqxNumberInput( Show2dec );
 
 	var dataAdapter = new $.jqx.dataAdapter(source);
 	var editrow = -1;
--- a/www/js/inv_miscs.js	Mon Feb 11 20:03:21 2019 +0100
+++ b/www/js/inv_miscs.js	Mon Feb 11 20:41:29 2019 +0100
@@ -164,8 +164,7 @@
 	$("#production_date").jqxDateTimeInput( Dateopts );
 	$("#cost").jqxNumberInput( Spin2dec );
 	$("#tht_date").jqxDateTimeInput( Dateopts );
-	$("#totval").jqxNumberInput( Spin2dec );
-	$("#totval").jqxNumberInput({ width: 90, readOnly: true, spinButtons: false });
+	$("#totval").jqxNumberInput( Show2dec );
 
 	var dataAdapter = new $.jqx.dataAdapter(source);
 	var editrow = -1;
--- a/www/js/inv_yeasts.js	Mon Feb 11 20:03:21 2019 +0100
+++ b/www/js/inv_yeasts.js	Mon Feb 11 20:41:29 2019 +0100
@@ -189,8 +189,7 @@
 	$("#max_reuse").jqxNumberInput({ max: 10 });
 	$("#cost").jqxNumberInput( Spin2dec );
 	$("#tht_date").jqxDateTimeInput( Dateopts );
-	$("#totval").jqxNumberInput( Spin2dec );
-	$("#totval").jqxNumberInput({ width: 90, readOnly: true, spinButtons: false });
+	$("#totval").jqxNumberInput( Show2dec );
 	$("#cells").jqxNumberInput( Spin1dec );
 
 	var dataAdapter = new $.jqx.dataAdapter(source);

mercurial