28 datafields: [ |
28 datafields: [ |
29 { name: 'record', type: 'number' }, |
29 { name: 'record', type: 'number' }, |
30 { name: 'name', type: 'string' }, |
30 { name: 'name', type: 'string' }, |
31 { name: 'code', type: 'string' }, |
31 { name: 'code', type: 'string' }, |
32 { name: 'birth', type: 'string' }, |
32 { name: 'birth', type: 'string' }, |
33 { name: 'stage', type: 'string' }, |
33 { name: 'stage', type: 'int' }, |
34 ], |
34 ], |
35 id: 'record', |
35 id: 'record', |
36 url: "includes/db_product.php?select=inprod" |
36 url: "includes/db_product.php?select=inprod" |
37 }; |
37 }; |
38 var dataAdapter = new $.jqx.dataAdapter(source); |
38 var dataAdapter = new $.jqx.dataAdapter(source); |
47 renderstatusbar: function (statusbar) { |
47 renderstatusbar: function (statusbar) { |
48 var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>"); |
48 var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>"); |
49 var addButton = $("<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>"); |
49 var addButton = $("<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>"); |
50 container.append(addButton); |
50 container.append(addButton); |
51 statusbar.append(container); |
51 statusbar.append(container); |
52 addButton.jqxButton({ theme: theme, width: 120, height: 20 }); |
52 addButton.jqxButton({ theme: theme, width: 90, height: 20 }); |
53 // add new recipe. |
53 // add new recipe. |
54 addButton.click(function (event) { |
54 addButton.click(function (event) { |
55 var url= "prod_new.php?return=prod_inprod.php"; |
55 var url= "prod_new.php?return=prod_inprod.php"; |
56 window.location.href = url; |
56 window.location.href = url; |
57 }); |
57 }); |
58 }, |
58 }, |
59 filterable: true, |
|
60 filtermode: 'excel', |
|
61 columns: [ |
59 columns: [ |
62 { text: 'Datum', datafield: 'birth', width: 120 }, |
60 { text: 'Datum', datafield: 'birth', width: 120 }, |
63 { text: 'Code', datafield: 'code', width: 120 }, |
61 { text: 'Code', datafield: 'code', width: 120 }, |
64 { text: 'Naam', datafield: 'name' }, |
62 { text: 'Naam', datafield: 'name' }, |
65 { text: 'Fase', datafield: 'stage', width: 130 }, |
63 { text: 'Fase', datafield: 'stage', width: 130, |
66 { text: 'Wijzig', datafield: 'Edit', width: 120, align: 'center', columntype: 'button', cellsrenderer: function () { |
64 cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
|
65 return "<div style='margin: 4px;'>" + StageData[value].nl + "</div>"; |
|
66 } |
|
67 }, |
|
68 { text: 'Wijzig', datafield: 'Edit', width: 100, align: 'center', columntype: 'button', cellsrenderer: function () { |
67 return "Wijzig"; |
69 return "Wijzig"; |
68 }, buttonclick: function (row) { |
70 }, buttonclick: function (row) { |
69 var datarecord = dataAdapter.records[row]; |
71 var datarecord = dataAdapter.records[row]; |
70 var url= "prod_edit.php?record=" + datarecord.record + "&select=inprod&return=prod_inprod.php"; |
72 var url= "prod_edit.php?record=" + datarecord.record + "&select=inprod&return=prod_inprod.php"; |
71 window.location.href = url; |
73 window.location.href = url; |