Wed, 16 Oct 2019 21:05:03 +0200
Added dutch array strings to a global php script. Changed fermentables, hops, yeast and misc inventory scripts to use these strings between the database scripts and javascript scripts. This makes filtering on types strings useable. Added these changes to the product/recipe forum and print exports too.
$(document).ready(function(){var b={},c="getwatersources.php",a={datatype:"json",datafields:[{name:"name",type:"string"},],url:c,async:false},d=new $.jqx.dataAdapter(a);url="includes/db_setup.php",source={datatype:"json",cache:false,datafields:[{name:"brewery_name",type:"string"},{name:"factor_mashhop",type:"number"},{name:"factor_fwh",type:"number"},{name:"factor_pellet",type:"number"},{name:"factor_plug",type:"number"},{name:"factor_wethop",type:"number"},{name:"factor_cryohop",type:"number"},{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"}],url:url},dataAdapter=new $.jqx.dataAdapter(source,{loadComplete:function(){var e=dataAdapter.records;b=e[0];$("#brewery_name").val(b.brewery_name);$("#factor_mashhop").val(b.factor_mashhop);$("#factor_fwh").val(b.factor_fwh);$("#factor_pellet").val(b.factor_pellet);$("#factor_plug").val(b.factor_plug);$("#factor_wethop").val(b.factor_wethop);$("#factor_cryohop").val(b.factor_cryohop);$("#color_method").val(b.color_method);$("#ibu_method").val(b.ibu_method);$("#brix_correction").val(b.brix_correction);$("#grain_absorbtion").val(b.grain_absorbtion)},loadError:function(g,e,f){},});dataAdapter.dataBind();$("#brewery_name").jqxTooltip({content:"De naam voor deze brouwerij."});$("#factor_mashhop").jqxTooltip({content:"Het efficientie percentage voor hop tijdens de maisch."});$("#factor_fwh").jqxTooltip({content:"Het efficientie percentage voor First Wort Hop."});$("#factor_pellet").jqxTooltip({content:"Het efficientie percentage bij gebruik van hop pellets."});$("#factor_plug").jqxTooltip({content:"Het efficientie percentage bij gebruik van hop plugs."});$("#factor_wethop").jqxTooltip({content:"Het efficientie percentage bij gebruik van nat geplukte hop."});$("#factor_cryohop").jqxTooltip({content:"Het efficientie percentage bij gebruik van Cryo Hop®."});$("#brix_correction").jqxTooltip({content:"Omzettingsfactor voor Plato naar Brix"});$("#grain_absorbtion").jqxTooltip({content:"Absorbtie van water door graan (L/Kg)"});$("#brewery_name").jqxInput({theme:theme,width:640,height:23});$("#factor_fwh").jqxNumberInput({inputMode:"simple",theme:theme,width:110,height:23,min:-50,max:50,decimalDigits:0,spinButtons:true,symbol:"%",symbolPosition:"right"});$("#factor_mashhop").jqxNumberInput({inputMode:"simple",theme:theme,width:110,height:23,min:-50,max:50,decimalDigits:0,spinButtons:true,symbol:"%",symbolPosition:"right"});$("#factor_pellet").jqxNumberInput({inputMode:"simple",theme:theme,width:110,height:23,min:0,max:20,decimalDigits:0,spinButtons:true,symbol:"%",symbolPosition:"right"});$("#factor_plug").jqxNumberInput({inputMode:"simple",theme:theme,width:110,height:23,min:0,max:20,decimalDigits:0,spinButtons:true,symbol:"%",symbolPosition:"right"});$("#factor_wethop").jqxNumberInput({inputMode:"simple",theme:theme,width:110,height:23,min:-98,max:-20,decimalDigits:0,spinButtons:true,symbol:"%",symbolPosition:"right"});$("#factor_cryohop").jqxNumberInput({inputMode:"simple",theme:theme,width:110,height:23,min:-20,max:150,decimalDigits:0,spinButtons:true,symbol:"%",symbolPosition:"right"});$("#brix_correction").jqxNumberInput({inputMode:"simple",theme:theme,width:110,height:23,min:1,max:1.05,decimalDigits:2,spinButtons:true});$("#grain_absorbtion").jqxNumberInput({inputMode:"simple",theme:theme,width:110,height:23,min:0.5,max:1.1,decimalDigits:2,spinButtons:true});$("#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,source:d,valueMember:"name",displayMember:"name",width:250,dropDownHorizontalAlignment:"right",dropDownWidth:300,autoDropDownHeight:true});$("#default_water").jqxDropDownList("selectItem",b.default_water);$("#Save").jqxButton({template:"success",width:"90px",theme:theme});$("#Save").click(function(){var e,f={record:1,brewery_name:$("#brewery_name").val(),factor_mashhop:$("#factor_mashhop").val(),factor_fwh:$("#factor_fwh").val(),factor_pellet:$("#factor_pellet").val(),factor_plug:$("#factor_plug").val(),factor_wethop:$("#factor_wethop").val(),factor_cryohop:$("#factor_cryohop").val(),color_method:$("#color_method").val(),ibu_method:$("#ibu_method").val(),brix_correction:parseFloat($("#brix_correction").jqxNumberInput("decimal")),grain_absorbtion:parseFloat($("#grain_absorbtion").jqxNumberInput("decimal")),default_water:$("#default_water").val()};e="update=true&"+$.param(f);$.ajax({dataType:"json",url:url,cache:false,data:e,type:"POST",success:function(h,g,i){},error:function(g,i,h){}})})});