Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.

Sat, 02 Mar 2019 12:59:10 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 02 Mar 2019 12:59:10 +0100
changeset 306
3435646b230e
parent 305
bb55e065888a
child 307
75f8b569043c

Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.

www/jqwidgets/styles/jqx.ui-mbse.css file | annotate | diff | comparison | revisions
www/js/prod_edit.js file | annotate | diff | comparison | revisions
--- a/www/jqwidgets/styles/jqx.ui-mbse.css	Fri Mar 01 16:19:27 2019 +0100
+++ b/www/jqwidgets/styles/jqx.ui-mbse.css	Sat Mar 02 12:59:10 2019 +0100
@@ -84,7 +84,7 @@
 .jqx-fill-state-hover-ui-mbse a, .jqx-fill-state-hover-ui-mbse a:hover{color:#fff; text-decoration:none}
 .jqx-fill-state-pressed-ui-mbse{border-color: #ffaf0f; background: #f58400 url(images/darkness/ui-bg_inset-soft_30_f58400_1x100.png) 50% 50% repeat-x; color: #ffffff; }
 .jqx-fill-state-pressed-ui-mbse a, .jqx-fill-state-pressed-ui-mbse a:link, .jqx-fill-state-pressed-ui-mbse a:visited{color:#ffffff; text-decoration:none}
-.jqx-fill-state-disabled-ui-mbse {cursor: default; color: #fff; opacity: .55; filter:Alpha(Opacity=45);}
+.jqx-fill-state-disabled-ui-mbse {cursor: default; color: #fff; opacity: .75; filter:Alpha(Opacity=25);}
 
 .jqx-input-button-content-ui-mbse{font-size:10px}
 .jqx-input-icon-ui-mbse{margin-left:2px; margin-top:-1px}
--- a/www/js/prod_edit.js	Fri Mar 01 16:19:27 2019 +0100
+++ b/www/js/prod_edit.js	Sat Mar 02 12:59:10 2019 +0100
@@ -1781,6 +1781,8 @@
 			$('#jqxTabs').jqxTabs('disableAt', 9);	// Fermentation tab
 		} else {
 			$('#jqxTabs').jqxTabs('enableAt', 9);
+			$("#name").jqxInput({ disabled: true });
+			$("#code").jqxInput({ disabled: true });
 			$("#batch_size").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 });
 			$("#boil_size").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 });
 			$("#boil_time").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 });
@@ -1844,18 +1846,58 @@
 			$('#jqxTabs').jqxTabs('disableAt', 10);	// Packaging tab
 		} else {
 			$('#jqxTabs').jqxTabs('enableAt', 10);
+			$("#primary_start_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 });
+			$("#primary_max_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 });
+			$("#primary_end_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 });
+			$("#primary_end_sg").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 });
+			$("#primary_end_brix").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 });
+			$("#primary_end_date").jqxDateTimeInput({ disabled: true });
+			$("#secondary_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 });
+			$("#secondary_end_date").jqxDateTimeInput({ disabled: true });
+			$("#tertiary_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 });
+			$("#fg").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 });
+			$("#final_brix").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 });
 		}
 		if (dataRecord.stage < 6) {	// Not yet packaged
 			$("#inventory_reduced").jqxCheckBox({ disabled : true });
 		} else {
 			if ($('#inventory_reduced').jqxCheckBox('checked'))
 				$("#inventory_reduced").jqxCheckBox({ disabled : true });
+			$("#package_date").jqxDateTimeInput({ disabled: true });
+			$("#bottle_amount").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 });
+			$("#keg_amount").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 });
+			$("#bottle_carbonation").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 });
+			$("#keg_carbonation").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 });
+			$("#bottle_priming_sugar").jqxDropDownList({ disabled: true });
+			$("#keg_priming_sugar").jqxDropDownList({ disabled: true });
+			$("#keg_forced_carb").jqxCheckBox({ disabled : true });
+			$("#bottle_carbonation_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 });
+			$("#keg_carbonation_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 });
 		}
 		if (dataRecord.stage < 8) { // Taste when at least Mature.
 			$('#jqxTabs').jqxTabs('disableAt', 11);	// Tasting tab
 		} else {
 			$('#jqxTabs').jqxTabs('enableAt', 11);
 		}
+
+		if (dataRecord.stage > 9) { // Tasted
+			$("#taste_date").jqxDateTimeInput({ disabled: true });
+			$("#taste_rate").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 });
+			$("#taste_color").jqxInput({ disabled: true });
+			$("#taste_transparency").jqxInput({ disabled: true });
+			$("#taste_head").jqxInput({ disabled: true });
+			$("#taste_aroma").jqxInput({ disabled: true });
+			$("#taste_taste").jqxInput({ disabled: true });
+			$("#taste_aftertaste").jqxInput({ disabled: true });
+			$("#taste_mouthfeel").jqxInput({ disabled: true });
+			$("#taste_notes").jqxInput({ disabled: true });
+		}
+
+		if (dataRecord.stage == 11) { // Locked
+			$("#notes").jqxInput({ disabled: true });
+		} else {
+			$("#notes").jqxInput({ disabled: false });
+		}
 	}
 
 	function showStarter() {
@@ -3932,17 +3974,17 @@
 	});
 	$("#locked").jqxCheckBox({ theme: theme, width: 120, height: 23, disabled : true });
 	$('#locked').on('checked', function (event) {
-		if (brewstage >= 10) {
-			$("#stage").val('Closed');
+		if (dataRecord.stage >= 10) {
 			dataRecord.locked = 1;
-			brewstage = 11;
+			dataRecord.stage = 11;
+			calcStage();
 		}
 	});
 	$('#locked').on('unchecked', function (event) {
-		if (brewstage >= 10) {
-			$("#stage").val('Ready');
+		if (dataRecord.stage >= 10) {
 			dataRecord.locked = 0;
-			brewstage = 10;
+			dataRecord.stage = 10;
+			calcStage();
 		}
 	});
 	$("#notes").jqxTooltip({ content: 'De uitgebreide opmerkingen over dit product.' });

mercurial