Dropped not needed fields from mash profiles.

Sat, 18 Aug 2018 19:40:30 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 18 Aug 2018 19:40:30 +0200
changeset 25
d9da6c40dff5
parent 24
754c56e785c6
child 26
af136d9eb3c5

Dropped not needed fields from mash profiles.

www/includes/db_inventory_mash_profiles.php file | annotate | diff | comparison | revisions
www/inv_mash_profiles.php file | annotate | diff | comparison | revisions
www/js/inv_mash_profiles.js file | annotate | diff | comparison | revisions
--- a/www/includes/db_inventory_mash_profiles.php	Sat Aug 18 17:40:24 2018 +0200
+++ b/www/includes/db_inventory_mash_profiles.php	Sat Aug 18 19:40:30 2018 +0200
@@ -14,14 +14,7 @@
 if (isset($_GET['insert'])) {
 	// INSERT COMMAND
 	$sql  = "INSERT INTO `inventory_mash_profiles` SET name='" . mysqli_real_escape_string($connect, $_GET['name']);
-	$sql .= "', grain_temp='" . $_GET['grain_temp'];
 	$sql .= "', notes='" . mysqli_real_escape_string($connect, $_GET['notes']);
-	$sql .= "', tun_temp='" . $_GET['tun_temp'];
-	$sql .= "', sparge_temp='" . $_GET['sparge_temp'];
-	$sql .= "', ph='" . $_GET['ph'];
-	$sql .= "', tun_weight='" . $_GET['tun_weight'];
-	$sql .= "', tun_specific_heat='" . $_GET['tun_specific_heat'];
-	($_GET['equip_adjust'] == 'true') ? $sql .= "', equip_adjust='1" : $sql .= "', equip_adjust='0";
 	$sql .= "', steps='" . mysqli_real_escape_string($connect, $_GET['steos']);
 	$sql .= "';";
 	$result = mysqli_query($connect, $sql);
@@ -35,14 +28,7 @@
 } else if (isset($_GET['update'])) {
 	// UPDATE COMMAND
 	$sql  = "UPDATE `inventory_mash_profiles` SET name='" . mysqli_real_escape_string($connect, $_GET['name']);
-	$sql .= "', grain_temp='" . $_GET['grain_temp'];
 	$sql .= "', notes='" . mysqli_real_escape_string($connect, $_GET['notes']);
-	$sql .= "', tun_temp='" . $_GET['tun_temp'];
-	$sql .= "', sparge_temp='" . $_GET['sparge_temp'];
-	$sql .= "', ph='" . $_GET['ph'];
-	$sql .= "', tun_weight='" . $_GET['tun_weight'];
-	$sql .= "', tun_specific_heat='" . $_GET['tun_specific_heat'];
-	($_GET['equip_adjust'] == 'true') ? $sql .= "', equip_adjust='1" : $sql .= "', equip_adjust='0";
 	$sql .= "', steps='" . mysqli_real_escape_string($connect, $_GET['steos']);
 	$sql .= "' WHERE record='" . $_GET['record'] . "';";
 	$result = mysqli_query($connect, $sql);
@@ -71,13 +57,6 @@
 		$suppliers[] = array(
 			'record' => $row['record'],
 			'name' => $row['name'],
-			'grain_temp' => $row['grain_temp'],
-			'tun_temp' => $row['tun_temp'],
-			'sparge_temp' => $row['sparge_temp'],
-			'ph' => $row['ph'],
-			'tun_weight' => $row['tun_weight'],
-			'tun_specific_heat' => $row['tun_specific_heat'],
-			'equip_adjust' => $row['equip_adjust'],
 			'notes' => $row['notes'],
 			'steps' => $row['steps']
 		);
--- a/www/inv_mash_profiles.php	Sat Aug 18 17:40:24 2018 +0200
+++ b/www/inv_mash_profiles.php	Sat Aug 18 19:40:30 2018 +0200
@@ -19,28 +19,6 @@
        <td align="left" colspan="3" style="vertical-align: top;"><input id="name" /></td>
       </tr>
       <tr>
-       <td align="right" style="vertical-align: top;">Graan temperatuur:</td>
-       <td align="left" style="vertical-align: top;"><input id="grain_temp" /></td>
-      <td align="right" style="vertical-align: top;">TUN temperatuur:</td>
-       <td align="left" style="vertical-align: top;"><input id="tun_temp" /></td>
-      </tr>
-      <tr>
-       <td align="right" style="vertical-align: top;">Spoelwater temperatuur:</td>
-       <td align="left" style="vertical-align: top;"><input id="sparge_temp" /></td>
-       <td align="right" style="vertical-align: top;">Zuurgraad pH:</td>
-       <td align="left" style="vertical-align: top;"><input id="ph" /></td>
-      </tr>
-      <tr>
-       <td align="right" style="vertical-align: top;">Maisch pan gewicht:</td>
-       <td align="left" style="vertical-align: top;"><input id="tun_weight" /></td>
-       <td align="right" style="vertical-align: top;">Maischpan specifix heat:</td>
-       <td align="left" style="vertical-align: top;"><input id="tun_specific_heat" /></td>
-      </tr>
-      <tr>
-       <td align="right" style="vertical-align: top;">Equipment adjust:</td>
-       <td align="left" colspan="3"><div id="equip_adjust"></div></td>
-      </tr>
-      <tr>
        <td align="right" style="vertical-align: top;">Opmerkingen:</td>
        <td align="left" colspan="3"><textarea id="notes"></textarea></td>
       </tr>
--- a/www/js/inv_mash_profiles.js	Sat Aug 18 17:40:24 2018 +0200
+++ b/www/js/inv_mash_profiles.js	Sat Aug 18 19:40:30 2018 +0200
@@ -51,14 +51,7 @@
 		datafields: [
 			{ name: 'record', type: 'number' },
 			{ name: 'name', type: 'string' },
-			{ name: 'grain_temp', type: 'float' },
-			{ name: 'tun_temp', type: 'float' },
-			{ name: 'sparge_temp', type: 'float' },
-			{ name: 'ph', type: 'float' },
-			{ name: 'tun_weight', type: 'float' },
-			{ name: 'tun_specific_heat', type: 'float' },
 			{ name: 'notes', type: 'string' },
-			{ name: 'equip_adjust', type: 'bool' },
 			{ name: 'steps', type: 'string' }
 		],
 		id: 'record',
@@ -114,15 +107,7 @@
 	};
 	// initialize the input fields.
 	$("#name").jqxInput({ theme: theme, width: 250, height: 23 });
-	$("#grain_temp").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true });
-	$("#tun_temp").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true });
-	$("#sparge_temp").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true });
-	$("#ph").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true });
-	$("#tun_weight").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true });
-	$("#tun_specific_heat").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true });
-
 	$("#notes").jqxInput({ theme: theme, width: 640, height: 100 });
-	$("#equip_adjust").jqxCheckBox({ theme: theme, width: 120, height: 23 });
 	var dataAdapter = new $.jqx.dataAdapter(source);
 	var editrow = -1;
 	// initialize jqxGrid
@@ -144,13 +129,6 @@
 				editrow = -1;
 				$("#popupWindow").jqxWindow({ position: { x: 230, y: 30 } });
 				$("#name").val('');
-				$("#grain_temp").val('');
-				$("#tun_temp").val('');
-				$("#sparge_temp").val('');
-				$("#ph").val('');
-				$("#tun_weight").val('');
-				$("#tun_specific_heat").val('');
-				$("#equip_adjust").val('');
 				$("#notes").val('');
 				$("#popupWindow").jqxWindow('open');
 			});
@@ -169,13 +147,6 @@
 					// get the clicked row's data and initialize the input fields.
 					var dataRecord = $("#jqxgrid").jqxGrid('getrowdata', editrow);
 					$("#name").val(dataRecord.name);
-					$("#grain_temp").val(dataRecord.grain_temp);
-					$("#tun_temp").val(dataRecord.tun_temp);
-					$("#sparge_temp").val(dataRecord.sparge_temp);
-					$("#ph").val(dataRecord.ph);
-					$("#tun_weight").val(dataRecord.tun_weight);
-					$("#tun_specific_heat").val(dataRecord.tun_specific_heat);
-					$("#equip_adjust").val(dataRecord.equip_adjust);
 					$("#notes").val(dataRecord.notes);
 					// show the popup window.
 					$("#popupWindow").jqxWindow('open');
@@ -211,13 +182,6 @@
 			var row = {
 				record: rowID,
 				name: $("#name").val(),
-				grain_temp: parseFloat($("#grain_temp").jqxNumberInput('decimal')),
-				tun_temp: parseFloat($("#tun_temp").jqxNumberInput('decimal')),
-				sparge_temp: parseFloat($("#sparge_temp").jqxNumberInput('decimal')),
-				ph: parseFloat($("#ph").jqxNumberInput('decimal')),
-				tun_weight: parseFloat($("#tun_weight").jqxNumberInput('decimal')),
-				tun_specific_heat: parseFloat($("#tun_specific_heat").jqxNumberInput('decimal')),
-				equip_adjust: $("equip_adjust").val(),
 				notes: $("#notes").val()
 			};
 			$('#jqxgrid').jqxGrid('updaterow', rowID, row);
@@ -227,13 +191,6 @@
 			var newrow = {
 				record: -1,
 				name: $("#name").val(),
-				grain_temp: parseFloat($("#grain_temp").jqxNumberInput('decimal')),
-				tun_temp: parseFloat($("#tun_temp").jqxNumberInput('decimal')),
-				sparge_temp: parseFloat($("#sparge_temp").jqxNumberInput('decimal')),
-				ph: parseFloat($("#ph").jqxNumberInput('decimal')),
-				tun_weight: parseFloat($("#tun_weight").jqxNumberInput('decimal')),
-				tun_specific_heat: parseFloat($("#tun_specific_heat").jqxNumberInput('decimal')),
-				equip_adjust: $("equip_adjust").val(),
 				notes: $("#notes").val()
 			};
 			$('#jqxgrid').jqxGrid('addrow', null, newrow);

mercurial