diff -r f51630063f00 -r 4451af8b6295 www/js/inv_yeasts.js --- a/www/js/inv_yeasts.js Sat Oct 12 14:00:33 2019 +0200 +++ b/www/js/inv_yeasts.js Sun Oct 13 22:02:49 2019 +0200 @@ -89,7 +89,14 @@ { name: 'production_date', type: 'string' }, { name: 'tht_date', type: 'string' }, { name: 'cells', type: 'float' }, - { name: 'tolerance', type: 'float' } + { name: 'tolerance', type: 'float' }, + { name: 'sta1', type: 'int' }, + { name: 'bacteria', type: 'int' }, + { name: 'harvest_top', type: 'int' }, + { name: 'harvest_time', type: 'int' }, + { name: 'pitch_temperature', type: 'float' }, + { name: 'pofpos', type: 'int' }, + { name: 'zymocide', type: 'int' } ], id: 'record', url: url, @@ -196,6 +203,29 @@ $("#cells").jqxNumberInput( Spin1dec ); $("#tolerance").jqxNumberInput( Perc1dec ); $("#tolerance").jqxNumberInput({ max: 25 }); + $('#sta1').jqxCheckBox({ theme: theme, width: 120, height: 23 }); + $('#sta1').on('checked', function(event) { dataRecord.sta1 = 1; }); + $('#sta1').on('unchecked', function(event) { dataRecord.sta1 = 0; }); + $('#bacteria').jqxCheckBox({ theme: theme, width: 120, height: 23 }); + $('#bacteria').on('checked', function(event) { dataRecord.bacteria = 1; }); + $('#bacteria').on('unchecked', function(event) { dataRecord.bacteria = 0; }); + $('#harvest_top').jqxCheckBox({ theme: theme, width: 120, height: 23 }); + $('#harvest_top').on('checked', function(event) { dataRecord.harvest_top = 1; }); + $('#harvest_top').on('unchecked', function(event) { dataRecord.harvest_top = 0; }); + $('#harvest_time').jqxNumberInput( PosInt ); + $("#pitch_temperature").jqxNumberInput( YeastT ); + $('#pofpos').jqxCheckBox({ theme: theme, width: 120, height: 23 }); + $('#pofpos').on('checked', function(event) { dataRecord.pofpos = 1; }); + $('#pofpos').on('unchecked', function(event) { dataRecord.pofpos = 0; }); + $("#zymocide").jqxDropDownList({ + theme: theme, + source: ZymocideAdapter, + valueMember: 'id', + displayMember: 'nl', + width: 80, + height: 23, + autoDropDownHeight: true + }); // initialize jqxGrid $("#jqxgrid").jqxGrid({ @@ -236,6 +266,13 @@ $("#tht_date").val(''); $("#cells").val(1); $("#tolerance").val(0); + $("#sta1").val(0); + $("#bacteria").val(0); + $("#harvest_top").val(0); + $("#harvest_time").val(0); + $("pitch_temperature#").val(0); + $("#pofpos").val(0); + $("#zymocide").val(0); $("#popupWindow").jqxWindow('open'); }); impButton.click(function (event) { @@ -288,7 +325,7 @@ }, buttonclick: function (row) { // open the popup window when the user clicks a button. editrow = row; - $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } }); + $("#popupWindow").jqxWindow({ position: { x: 110, y: 15 } }); // get the clicked row's data and initialize the input fields. dataRecord = $("#jqxgrid").jqxGrid('getrowdata', editrow); $("#name").val(dataRecord.name); @@ -296,8 +333,8 @@ $("#product_id").val(dataRecord.product_id); $("#type").val(dataRecord.type); $("#form").val(dataRecord.form); - $("#min_temperature").val(dataRecord.min_temperature); - $("#max_temperature").val(dataRecord.max_temperature); + $("#min_temperature").val(parseFloat(dataRecord.min_temperature)); + $("#max_temperature").val(parseFloat(dataRecord.max_temperature)); $("#flocculation").val(dataRecord.flocculation); $("#attenuation").val(dataRecord.attenuation); $("#notes").val(dataRecord.notes); @@ -312,6 +349,13 @@ $("#tht_date").val(dataRecord.tht_date); $("#cells").val(dataRecord.cells); $("#tolerance").val(dataRecord.tolerance); + $("#sta1").val(dataRecord.sta1); + $("#bacteria").val(dataRecord.bacteria); + $("#harvest_top").val(dataRecord.harvest_top); + $("#harvest_time").val(dataRecord.harvest_time); + $("#pitch_temperature").val(parseFloat(dataRecord.pitch_temperature)); + $("#pofpos").val(dataRecord.pofpos); + $("#zymocide").val(dataRecord.zymocide); calcTotal(); // show the popup window. $("#popupWindow").jqxWindow('open'); @@ -342,7 +386,7 @@ // initialize the popup window and buttons. $("#popupWindow").jqxWindow({ width: 1050, - height: 575, + height: 625, resizable: false, theme: theme, isModal: true, @@ -375,8 +419,8 @@ form: $("#form").val(), laboratory: $("#laboratory").val(), product_id: $("#product_id").val(), - min_temperature: parseInt($("#min_temperature").jqxNumberInput('decimal')), - max_temperature: parseInt($("#max_temperature").jqxNumberInput('decimal')), + min_temperature: parseFloat($("#min_temperature").jqxNumberInput('decimal')), + max_temperature: parseFloat($("#max_temperature").jqxNumberInput('decimal')), flocculation: $("#flocculation").val(), attenuation: parseFloat($("#attenuation").jqxNumberInput('decimal')), notes: $("#notes").val(), @@ -387,7 +431,14 @@ production_date: '', tht_date: '', cells: parseFloat($("#cells").jqxNumberInput('decimal')), - tolerance: parseFloat($("#tolerance").jqxNumberInput('decimal')) + tolerance: parseFloat($("#tolerance").jqxNumberInput('decimal')), + sta1: $("#sta1").val(), + bacteria: $("#bacteria").val(), + harvest_top: $("#harvest_top").val(), + harvest_time: $("#harvest_time").val(), + pitch_temperature: parseFloat($("#pitch_temperature").jqxNumberInput('decimal')), + pofpos: $("#pofpos").val(), + zymocide: $("#zymocide").val() }; $('#jqxgrid').jqxGrid('addrow', null, row); $("#popupWindow").jqxWindow('hide'); @@ -410,8 +461,8 @@ form: $("#form").val(), laboratory: $("#laboratory").val(), product_id: $("#product_id").val(), - min_temperature: parseInt($("#min_temperature").jqxNumberInput('decimal')), - max_temperature: parseInt($("#max_temperature").jqxNumberInput('decimal')), + min_temperature: parseFloat($("#min_temperature").jqxNumberInput('decimal')), + max_temperature: parseFloat($("#max_temperature").jqxNumberInput('decimal')), flocculation: $("#flocculation").val(), attenuation: parseFloat($("#attenuation").jqxNumberInput('decimal')), notes: $("#notes").val(), @@ -422,7 +473,14 @@ production_date: $("#production_date").val(), tht_date: $("#tht_date").val(), cells: parseFloat($("#cells").jqxNumberInput('decimal')), - tolerance: parseFloat($("#tolerance").jqxNumberInput('decimal')) + tolerance: parseFloat($("#tolerance").jqxNumberInput('decimal')), + sta1: $("#sta1").val(), + bacteria: $("#bacteria").val(), + harvest_top: $("#harvest_top").val(), + harvest_time: $("#harvest_time").val(), + pitch_temperature: parseFloat($("#pitch_temperature").jqxNumberInput('decimal')), + pofpos: $("#pofpos").val(), + zymocide: $("#zymocide").val() }; if (editrow >= 0) { $('#jqxgrid').jqxGrid('updaterow', rowID, row);