Sun, 13 Oct 2019 22:02:49 +0200
Added new fields in inventory_yeasts for Kveik and extra generic flags. Currently these fields do nothing but adding extra information in the database. Added Brett, Kveik and Hybrid yeast types.
467
f8d16480a6a7
Code optimisation for compressed javascript
Michiel Broek <mbroek@mbse.eu>
parents:
463
diff
changeset
|
1 | $(document).ready(function(){var a={datatype:"json",cache:false,datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"code",type:"string"},{name:"birth",type:"string"},{name:"stage",type:"int"},{name:"brew_date",type:"string"},{name:"package_date",type:"string"},],id:"record",url:"includes/db_product.php?select=inprod"},b=new $.jqx.dataAdapter(a);$("#jqxgrid").jqxGrid({width:1280,height:630,source:b,theme:theme,showstatusbar:true,renderstatusbar:function(e){var c,d;c=$("<div style='overflow: hidden; position: relative; margin: 5px;'></div>");d=$("<div style='float: right; margin-right: 15px;'><img style='position: relative; margin-top: 2px;' src='images/add.png'/><span style='margin-left: 4px; position: relative; top: -3px;'>Add</span></div>");c.append(d);e.append(c);d.jqxButton({theme:theme,width:90,height:20});d.click(function(f){window.location.href="prod_new.php?return=prod_inprod.php"})},columns:[{text:"Datum",datafield:"birth",width:120},{text:"Code",datafield:"code",width:120},{text:"Naam",datafield:"name"},{text:"Fase",datafield:"stage",width:200,cellsrenderer:function(k,f,m,o,g,q){var c,l,p,n,h,j,i,e;c=StageData[m].nl;if(m==2){c=StageData[m].nl+" op "+q.brew_date}if(m==7||m==8){l=new Date();n=q.package_date;n=n.split("-");p=new Date(l.getFullYear(),l.getMonth(),l.getDate());n=new Date(n[0],n[1]-1,n[2]);h=parseInt(p.getTime()/1000);j=parseInt(n.getTime()/1000);i=h-j;e=Math.round(i/60/60/24);if(e>=14){c=StageData[m].nl+" dag "+(e-14)+" van 28"}else{c=StageData[m].nl+" dag "+e+" van 14"}}return"<span style='margin: 3px; margin-top: 6px; float: left;'>"+c+"</span>"}},{text:"",datafield:"Edit",width:100,align:"center",columntype:"button",cellsrenderer:function(){return"Wijzig"},buttonclick:function(d){var c=b.records[d];window.location.href="prod_edit.php?record="+c.record+"&select=inprod&return=prod_inprod.php"}}],})}); |