# HG changeset patch # User Michiel Broek # Date 1548269035 -3600 # Node ID 63174cff2cc1382078c75f7961d503277e43ea82 # Parent 531d5458782f6af6096e67739ab26f8f8adede04 Failed attempt to get the filterbox right. Saved as a reference. diff -r 531d5458782f -r 63174cff2cc1 www/js/inv_fermentables.js --- a/www/js/inv_fermentables.js Tue Jan 22 22:46:58 2019 +0100 +++ b/www/js/inv_fermentables.js Wed Jan 23 19:43:55 2019 +0100 @@ -230,11 +230,22 @@ columns: [ { text: 'Producent', datafield: 'supplier', width: 140 }, { text: 'Vergistbaar product', datafield: 'name' }, - { text: 'Soort', datafield: 'type', align: 'center', cellsalign: 'center', width: 135, + { text: 'Soort', width: 135, filtertype: 'list', /*filteritems: FermentableTypeAdapter, displayfield: 'nl',*/ datafield: 'type', cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { - return "
" + FermentableTypeData[value].nl + "
"; - } - }, + return "
" + FermentableTypeData[rowdata.type].nl + "
"; + }, +// createfilterwidget: function (column, htmlElement, editor) { +// editor.jqxDropDownList({ displayMember: "nl", valueMember: "id" }); +// } +// createfilterwidget: function (column, columnElement, widget) { +// widget.jqxDropDownList({ dropDownWidth: 350 }); +// } + }, +// { text: 'Soort', datafield: 'type', align: 'center', cellsalign: 'center', width: 135, +// cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { +// return "
" + FermentableTypeData[value].nl + "
"; +// }, +// }, { text: 'Graan type', datafield: 'graintype', align: 'center', cellsalign: 'center', width: 125, cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { return "
" + GrainTypeData[value].nl + "
";