www/js/prod_inprod-min.js

changeset 463
0efdafd23753
child 467
f8d16480a6a7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/www/js/prod_inprod-min.js	Thu Sep 05 20:14:16 2019 +0200
@@ -0,0 +1,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"};var b=new $.jqx.dataAdapter(a);$("#jqxgrid").jqxGrid({width:1280,height:630,source:b,theme:theme,showstatusbar:true,renderstatusbar:function(e){var c=$("<div style='overflow: hidden; position: relative; margin: 5px;'></div>");var 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(g){var f="prod_new.php?return=prod_inprod.php";window.location.href=f})},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(i,f,k,m,g,n){var c=StageData[k].nl;if(k==2){c=StageData[k].nl+" op "+n.brew_date}if(k==7||k==8){var j=new Date();var l=n.package_date;l=l.split("-");date1=new Date(j.getFullYear(),j.getMonth(),j.getDate());l=new Date(l[0],l[1]-1,l[2]);date1_unixtime=parseInt(date1.getTime()/1000);date2_unixtime=parseInt(l.getTime()/1000);var h=date1_unixtime-date2_unixtime;var e=Math.round(h/60/60/24);if(e>=14){c=StageData[k].nl+" dag "+(e-14)+" van 28"}else{c=StageData[k].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(e){var d=b.records[e];var c="prod_edit.php?record="+d.record+"&select=inprod&return=prod_inprod.php";window.location.href=c}}],})});
\ No newline at end of file

mercurial