--- a/www/js/prod_inprod.js Sat Feb 02 20:49:41 2019 +0100 +++ b/www/js/prod_inprod.js Sat Feb 02 21:35:54 2019 +0100 @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2018 + * Copyright (C) 2018-2019 * * Michiel Broek <mbroek at mbse dot eu> * @@ -30,7 +30,7 @@ { name: 'name', type: 'string' }, { name: 'code', type: 'string' }, { name: 'birth', type: 'string' }, - { name: 'stage', type: 'string' }, + { name: 'stage', type: 'int' }, ], id: 'record', url: "includes/db_product.php?select=inprod" @@ -49,21 +49,23 @@ 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>"); container.append(addButton); statusbar.append(container); - addButton.jqxButton({ theme: theme, width: 120, height: 20 }); + addButton.jqxButton({ theme: theme, width: 90, height: 20 }); // add new recipe. addButton.click(function (event) { var url= "prod_new.php?return=prod_inprod.php"; window.location.href = url; }); }, - filterable: true, - filtermode: 'excel', columns: [ { text: 'Datum', datafield: 'birth', width: 120 }, { text: 'Code', datafield: 'code', width: 120 }, { text: 'Naam', datafield: 'name' }, - { text: 'Fase', datafield: 'stage', width: 130 }, - { text: 'Wijzig', datafield: 'Edit', width: 120, align: 'center', columntype: 'button', cellsrenderer: function () { + { text: 'Fase', datafield: 'stage', width: 130, + cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { + return "<div style='margin: 4px;'>" + StageData[value].nl + "</div>"; + } + }, + { text: 'Wijzig', datafield: 'Edit', width: 100, align: 'center', columntype: 'button', cellsrenderer: function () { return "Wijzig"; }, buttonclick: function (row) { var datarecord = dataAdapter.records[row];