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.
507
17f244137a9b
Add refermentation logfile and graph.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
1 | $(document).ready(function(){$("#jqxMenu").jqxMenu("destroy");$("#jqxLoader").jqxLoader({width:250,height:150,isModal:true,text:"Opmaken grafiek ...",theme:theme});$("#jqxLoader").jqxLoader("open");function a(){return"https://www.jqwidgets.com/export_server/export.php"}var d={datatype:"json",datafields:[{name:"date",type:"date",format:"yyyy-MM-dd HH:mm"},{name:"temperature",type:"float"},{name:"pressure",type:"float"},{name:"uuid",type:"string"}],url:"getco2pressurelog.php?code="+my_code+"&name="+my_name},c=new $.jqx.dataAdapter(d,{autoBind:true,async:false,loadComplete:function(){$("#jqxLoader").jqxLoader("close")},loadError:function(g,e,f){}}),b={title:my_code+' "'+my_name+'"',description:"",source:c,xAxis:{dataField:"date",type:"date",formatFunction:function(e){return e.getDate()+"-"+(e.getMonth()+1)+"-"+e.getFullYear()},toolTipFormatFunction:function(g){var f=g.getHours(),e=g.getMinutes();return g.getDate()+"-"+(g.getMonth()+1)+"-"+g.getFullYear()+" "+(f<10?"0"+f:f)+":"+(e<10?"0"+e:e)},textRotationAngle:45,howGridLines:false},colorScheme:"scheme01",seriesGroups:[{type:"area",valueAxis:{minValue:0,displayValueAxis:false,description:"Druk in bar"},series:[{dataField:"pressure",lineWidth:1,displayText:"Druk",opacity:0.4}]},{type:"spline",valueAxis:{minValue:0,description:"Graden C"},series:[{dataField:"temperature",lineWidth:1,displayText:"Temperatuur"}]}]};$("#pressure_chart").jqxChart(b);$("#print").click(function(){var g=$("#pressure_chart")[0].outerHTML,h=window.open("","","width=865, height=425"),e=h.document.open(),f='<!DOCTYPE html><html><head><link rel="stylesheet" href="jqwidgets/styles/jqx.base.css" type="text/css" /><meta charset="utf-8" /><title>'+my_code+" "+my_name+" hergisting</title></head><body>"+g+"</body></html>";e.write(f);e.close();h.print()});$("#print").jqxButton({template:"primary",width:125,theme:theme});$("#pdfButton").click(function(){$("#pressure_chart").jqxChart("saveAsPDF","hergisting_"+my_code+".pdf",a())});$("#pdfButton").jqxButton({template:"primary",width:125,theme:theme});$("#pngButton").click(function(){$("#pressure_chart").jqxChart("saveAsPNG","hergisting_"+my_code+".png",a())});$("#pngButton").jqxButton({template:"primary",width:125,theme:theme});$("#Close").jqxButton({template:"success",width:125,theme:theme});$("#Close").click(function(){window.close()})}); |