# HG changeset patch # User Michiel Broek # Date 1592043266 -7200 # Node ID 3ce3df681be0a688442b3e82575dce27c0337940 # Parent 89b7449d1fd9946c066e674aaf0ac33b836bd20e Changed inventory and profile databases filtering. diff -r 89b7449d1fd9 -r 3ce3df681be0 www/js/inv_equipments.js --- a/www/js/inv_equipments.js Thu Jun 11 19:59:30 2020 +0200 +++ b/www/js/inv_equipments.js Sat Jun 13 12:14:26 2020 +0200 @@ -3,7 +3,7 @@ * * Michiel Broek * - * This file is part of BrewCloud + * This file is part of Brewery Management System * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -132,9 +132,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); }, addrow: function(rowid, rowdata, position, commit) { @@ -149,9 +147,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); }, updaterow: function(rowid, rowdata, commit) { @@ -166,9 +162,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); } }, @@ -229,14 +223,14 @@ renderstatusbar: function(statusbar) { var addButton, container = $('
'); addButton = $('
Nieuw
'); + 'src="images/add.png"/>Nieuw'); expButton = $('
Export
'); + 'src="images/database.png"/>Export'); container.append(addButton); container.append(expButton); statusbar.append(container); - addButton.jqxButton({ theme: theme, width: 90, height: 20 }); - expButton.jqxButton({ theme: theme, width: 90, height: 20 }); + addButton.jqxButton({ theme: theme, width: 90, height: 17 }); + expButton.jqxButton({ theme: theme, width: 90, height: 17 }); // add new row. addButton.click(function(event) { editrow = -1; diff -r 89b7449d1fd9 -r 3ce3df681be0 www/js/inv_fermentables.js --- a/www/js/inv_fermentables.js Thu Jun 11 19:59:30 2020 +0200 +++ b/www/js/inv_fermentables.js Sat Jun 13 12:14:26 2020 +0200 @@ -1,9 +1,9 @@ /***************************************************************************** - * Copyright (C) 2014-2019 + * Copyright (C) 2014-2020 * * Michiel Broek * - * This file is part of BrewCloud + * This file is part of Brewery Management System * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -94,9 +94,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); }, addrow: function(rowid, rowdata, position, commit) { @@ -111,9 +109,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); }, updaterow: function(rowid, rowdata, commit) { @@ -128,9 +124,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); } }, @@ -188,6 +182,9 @@ $('#tht_date').jqxDateTimeInput(Dateopts); $('#totval').jqxNumberInput(Show2dec); + var localizationobj = {}; + localizationobj.filterchoosestring= "Keuze:"; + // initialize jqxGrid $('#jqxgrid').jqxGrid({ width: 1280, @@ -199,18 +196,18 @@ var container, addButton, impButton; container = $('
'); addButton = $('
Nieuw
'); + 'src="images/add.png"/>Nieuw'); impButton = $('
Import
'); + 'src="images/add.png"/>Import'); expButton = $('
Export
'); + 'src="images/database.png"/>Export'); container.append(addButton); container.append(impButton); container.append(expButton); statusbar.append(container); - addButton.jqxButton({ theme: theme, width: 90, height: 20 }); - impButton.jqxButton({ theme: theme, width: 90, height: 20 }); - expButton.jqxButton({ theme: theme, width: 90, height: 20 }); + addButton.jqxButton({ theme: theme, width: 90, height: 17 }); + impButton.jqxButton({ theme: theme, width: 90, height: 17 }); + expButton.jqxButton({ theme: theme, width: 90, height: 17 }); // add new row. addButton.click(function(event) { editrow = -1; @@ -248,17 +245,20 @@ window.open('export_fermentables.php'); }); }, + ready: function () { + $("#jqxgrid").jqxGrid('localizestrings', localizationobj); + }, filterable: true, - filtermode: 'excel', + showfilterrow: true, columns: [ - { text: 'Herkomst', datafield: 'origin', width: 150 }, - { text: 'Producent', datafield: 'supplier', width: 140 }, - { text: 'Vergistbaar product', datafield: 'name', menu: false }, - { text: 'Soort', width: 135, filtertype: 'list', datafield: 'type' }, - { text: 'Graan type', datafield: 'graintype', align: 'center', cellsalign: 'center', width: 125 }, - { text: 'EBC', datafield: 'color', width: 60, align: 'right', menu: false, cellsalign: 'right' }, - { text: 'Opbrengst', datafield: 'yield', width: 70, align: 'right', menu: false, cellsalign: 'right', cellsformat: 'p1' }, - { text: 'Voorraad', datafield: 'inventory', width: 100, align: 'right', menu: false, + { text: 'Herkomst', datafield: 'origin', width: 150, filtertype: 'list' }, + { text: 'Producent', datafield: 'supplier', width: 140, filtertype: 'list' }, + { text: 'Vergistbaar product', datafield: 'name', filtertype: 'textbox' }, + { text: 'Soort', datafield: 'type', width: 135, filtertype: 'list' }, + { text: 'Graan type', datafield: 'graintype', width: 125, align: 'center', cellsalign: 'center', filtertype: 'list' }, + { text: 'EBC', datafield: 'color', width: 70, align: 'right', cellsalign: 'right', filtertype: 'number' }, + { text: 'Opbrengst', datafield: 'yield', width: 70, align: 'right', cellsalign: 'right', cellsformat: 'p1', filterable: false }, + { text: 'Voorraad', datafield: 'inventory', width: 100, align: 'right', filtertype: 'number', filtercondition: 'not_equal', cellsrenderer: function(index, datafield, value, defaultvalue, column, rowdata) { var amount = ''; if (value > 0) { @@ -270,7 +270,7 @@ return '' + amount + ''; } }, - { text: '', datafield: 'Edit', width: 100, align: 'center', menu: false, columntype: 'button', + { text: '', datafield: 'Edit', width: 100, align: 'center', columntype: 'button', filterable: false, cellsrenderer: function() { return 'Wijzig'; }, buttonclick: function(row) { diff -r 89b7449d1fd9 -r 3ce3df681be0 www/js/inv_hops.js --- a/www/js/inv_hops.js Thu Jun 11 19:59:30 2020 +0200 +++ b/www/js/inv_hops.js Sat Jun 13 12:14:26 2020 +0200 @@ -1,9 +1,9 @@ /***************************************************************************** - * Copyright (C) 2014-2019 + * Copyright (C) 2014-2020 * * Michiel Broek * - * This file is part of BrewCloud + * This file is part of Brewery Management System * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -89,9 +89,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); }, addrow: function(rowid, rowdata, position, commit) { @@ -106,9 +104,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); }, updaterow: function(rowid, rowdata, commit) { @@ -123,9 +119,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); } }, @@ -171,6 +165,9 @@ $('#total_oil').jqxNumberInput(Perc1dec); $('#totval').jqxNumberInput(Show2dec); + var localizationobj = {}; + localizationobj.filterchoosestring= "Keuze:"; + // initialize jqxGrid $('#jqxgrid').jqxGrid({ width: 1280, @@ -182,18 +179,18 @@ var container, addButton, impButton; container = $('
'); addButton = $('
Nieuw
'); + 'src="images/add.png"/>Nieuw'); impButton = $('
Import
'); + 'src="images/add.png"/>Import'); expButton = $('
Export
'); + 'src="images/database.png"/>Export'); container.append(addButton); container.append(impButton); container.append(expButton); statusbar.append(container); - addButton.jqxButton({ theme: theme, width: 90, height: 20 }); - impButton.jqxButton({ theme: theme, width: 90, height: 20 }); - expButton.jqxButton({ theme: theme, width: 90, height: 20 }); + addButton.jqxButton({ theme: theme, width: 90, height: 17 }); + impButton.jqxButton({ theme: theme, width: 90, height: 17 }); + expButton.jqxButton({ theme: theme, width: 90, height: 17 }); // add new row. addButton.click(function(event) { editrow = -1; @@ -226,19 +223,22 @@ window.open('export_hops.php'); }); }, + ready: function () { + $("#jqxgrid").jqxGrid('localizestrings', localizationobj); + }, filterable: true, - filtermode: 'excel', + showfilterrow: true, columns: [ - { text: 'Herkomst', datafield: 'origin', width: 150 }, - { text: 'Hop Naam', datafield: 'name', menu: false }, - { text: 'Soort', datafield: 'type', align: 'left', width: 90 }, - { text: 'Vorm', datafield: 'form', align: 'left', width: 90 }, - { text: 'Alpha %', datafield: 'alpha', width: 80, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'p1' }, - { text: 'Beta %', datafield: 'beta', width: 80, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'p1' }, - { text: 'Cohumuloon %%', datafield: 'cohumulone', width: 80, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'p1' }, - { text: 'HSI', datafield: 'hsi', width: 60, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'f1' }, - { text: 'Oogst datum', datafield: 'production_date', align: 'center', cellsalign: 'center', menu: false, width: 110 }, - { text: 'Voorraad', datafield: 'inventory', width: 100, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'f1', + { text: 'Herkomst', datafield: 'origin', width: 150, filtertype: 'list' }, + { text: 'Hop Naam', datafield: 'name', filtertype: 'textbox' }, + { text: 'Soort', datafield: 'type', align: 'left', width: 90, filtertype: 'list' }, + { text: 'Vorm', datafield: 'form', align: 'left', width: 90, filtertype: 'list' }, + { text: 'Alpha %', datafield: 'alpha', width: 80, align: 'right', cellsalign: 'right', cellsformat: 'p1', filtertype: 'number' }, + { text: 'Beta %', datafield: 'beta', width: 80, align: 'right', cellsalign: 'right', cellsformat: 'p1', filtertype: 'number' }, + { text: 'Cohumuloon %%', datafield: 'cohumulone', width: 80, align: 'right', cellsalign: 'right', cellsformat: 'p1', filterable: false }, + { text: 'HSI', datafield: 'hsi', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f1', filterable: false }, + { text: 'Oogst datum', datafield: 'production_date', align: 'center', cellsalign: 'center', width: 110, filtertype: 'date' }, + { text: 'Voorraad', datafield: 'inventory', width: 100, align: 'right', filtertype: 'number', filtercondition: 'not_equal', cellsrenderer: function(index, datafield, value, defaultvalue, column, rowdata) { var amount = ''; if (value > 0) { @@ -250,7 +250,7 @@ return '' + amount + ''; } }, - { text: '', datafield: 'Wijzig', columntype: 'button', width: 100, align: 'center', menu: false, + { text: '', datafield: 'Wijzig', columntype: 'button', width: 100, align: 'center', filterable: false, cellsrenderer: function() { return 'Wijzig'; }, buttonclick: function(row) { diff -r 89b7449d1fd9 -r 3ce3df681be0 www/js/inv_miscs.js --- a/www/js/inv_miscs.js Thu Jun 11 19:59:30 2020 +0200 +++ b/www/js/inv_miscs.js Sat Jun 13 12:14:26 2020 +0200 @@ -3,6 +3,8 @@ * * Michiel Broek * + * This file is part of Brewery Management System + * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2, or (at your option) any @@ -95,9 +97,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); }, addrow: function(rowid, rowdata, position, commit) { @@ -112,9 +112,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); }, updaterow: function(rowid, rowdata, commit) { @@ -129,9 +127,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); } }, @@ -169,6 +165,9 @@ $('#tht_date').jqxDateTimeInput(Dateopts); $('#totval').jqxNumberInput(Show2dec); + var localizationobj = {}; + localizationobj.filterchoosestring= "Keuze:"; + // initialize jqxGrid $('#jqxgrid').jqxGrid({ width: 1280, @@ -179,18 +178,18 @@ renderstatusbar: function(statusbar) { var container = $('
'); var addButton = $('
Nieuw
'); + 'src="images/add.png"/>Nieuw'); var impButton = $('
Import
'); + 'src="images/add.png"/>Import'); var expButton = $('
Export
'); + 'src="images/database.png"/>Export'); container.append(addButton); container.append(impButton); container.append(expButton); statusbar.append(container); - addButton.jqxButton({ theme: theme, width: 90, height: 20 }); - impButton.jqxButton({ theme: theme, width: 90, height: 20 }); - expButton.jqxButton({ theme: theme, width: 90, height: 20 }); + addButton.jqxButton({ theme: theme, width: 90, height: 17 }); + impButton.jqxButton({ theme: theme, width: 90, height: 17 }); + expButton.jqxButton({ theme: theme, width: 90, height: 17 }); // add new row. addButton.click(function(event) { editrow = -1; @@ -216,13 +215,16 @@ window.open('export_miscs.php'); }); }, + ready: function () { + $("#jqxgrid").jqxGrid('localizestrings', localizationobj); + }, filterable: true, - filtermode: 'excel', + showfilterrow: true, columns: [ - { text: 'Ingredient naam', datafield: 'name', menu: false }, - { text: 'Type', datafield: 'type', align: 'left', width: 120 }, - { text: 'Gebruik', datafield: 'use_use', align: 'left', width: 120 }, - { text: 'Tijd', datafield: 'time', width: 90, align: 'left', menu: false, + { text: 'Ingredient naam', datafield: 'name', filtertype: 'textbox' }, + { text: 'Type', datafield: 'type', align: 'left', width: 120, filtertype: 'list' }, + { text: 'Gebruik', datafield: 'use_use', align: 'left', width: 120, filtertype: 'list' }, + { text: 'Tijd', datafield: 'time', width: 90, align: 'left', filterable: false, cellsrenderer: function(index, datafield, value, defaultvalue, column, rowdata) { var duration = ''; if (value > 0) { @@ -242,7 +244,7 @@ return '' + duration + ''; } }, - { text: 'Voorraad', datafield: 'inventory', width: 110, menu: false, align: 'right', + { text: 'Voorraad', datafield: 'inventory', width: 110, align: 'right', filtertype: 'number', filtercondition: 'not_equal', cellsrenderer: function(index, datafield, value, defaultvalue, column, rowdata) { var amount = ''; if (value > 0) { @@ -254,8 +256,8 @@ return '' + amount + ''; } }, - { text: 'THT datum', datafield: 'tht_date', width: 100, menu: false, align: 'center', cellsalign: 'center' }, - { text: '', datafield: 'Edit', columntype: 'button', width: 100, menu: false, align: 'center', + { text: 'THT datum', datafield: 'tht_date', width: 100, align: 'center', cellsalign: 'center', filtertype: 'date' }, + { text: '', datafield: 'Edit', columntype: 'button', width: 100, align: 'center', filterable: false, cellsrenderer: function() { return 'Wijzig'; }, buttonclick: function(row) { diff -r 89b7449d1fd9 -r 3ce3df681be0 www/js/inv_waters.js --- a/www/js/inv_waters.js Thu Jun 11 19:59:30 2020 +0200 +++ b/www/js/inv_waters.js Sat Jun 13 12:14:26 2020 +0200 @@ -3,7 +3,7 @@ * * Michiel Broek * - * This file is part of BrewCloud + * This file is part of Brewery Management System * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -97,9 +97,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); }, addrow: function(rowid, rowdata, position, commit) { @@ -114,9 +112,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); }, updaterow: function(rowid, rowdata, commit) { @@ -131,9 +127,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); } }, @@ -166,14 +160,14 @@ renderstatusbar: function(statusbar) { var addButton, container = $('
'); addButton = $('
Nieuw
'); + 'src="images/add.png"/>Nieuw'); expButton = $('
Export
'); + 'src="images/database.png"/>Export'); container.append(addButton); container.append(expButton); statusbar.append(container); - addButton.jqxButton({ theme: theme, width: 90, height: 20 }); - expButton.jqxButton({ theme: theme, width: 90, height: 20 }); + addButton.jqxButton({ theme: theme, width: 90, height: 17 }); + expButton.jqxButton({ theme: theme, width: 90, height: 17 }); // add new row. addButton.click(function(event) { editrow = -1; diff -r 89b7449d1fd9 -r 3ce3df681be0 www/js/inv_yeasts.js --- a/www/js/inv_yeasts.js Thu Jun 11 19:59:30 2020 +0200 +++ b/www/js/inv_yeasts.js Sat Jun 13 12:14:26 2020 +0200 @@ -3,7 +3,7 @@ * * Michiel Broek * - * This file is part of BrewCloud + * This file is part of Brewery Management System * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -114,9 +114,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); }, addrow: function(rowid, rowdata, position, commit) { @@ -131,9 +129,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); }, updaterow: function(rowid, rowdata, commit) { @@ -148,9 +144,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); } }, @@ -228,6 +222,9 @@ autoDropDownHeight: true }); + var localizationobj = {}; + localizationobj.filterchoosestring= "Keuze:"; + // initialize jqxGrid $('#jqxgrid').jqxGrid({ width: 1280, @@ -239,18 +236,18 @@ var container, addButton, impButton; container = $('
'); addButton = $('
Nieuw
'); + 'src="images/add.png"/>Nieuw'); impButton = $('
Import
'); + 'src="images/add.png"/>Import'); expButton = $('
Export
'); + 'src="images/database.png"/>Export'); container.append(addButton); container.append(impButton); container.append(expButton); statusbar.append(container); - addButton.jqxButton({ theme: theme, width: 90, height: 20 }); - impButton.jqxButton({ theme: theme, width: 90, height: 20 }); - expButton.jqxButton({ theme: theme, width: 90, height: 20 }); + addButton.jqxButton({ theme: theme, width: 90, height: 17 }); + impButton.jqxButton({ theme: theme, width: 90, height: 17 }); + expButton.jqxButton({ theme: theme, width: 90, height: 17 }); // add new row. addButton.click(function(event) { editrow = -1; @@ -290,16 +287,19 @@ window.open('export_yeasts.php'); }); }, + ready: function () { + $("#jqxgrid").jqxGrid('localizestrings', localizationobj); + }, filterable: true, - filtermode: 'excel', + showfilterrow: true, columns: [ - { text: 'Laboratorium', datafield: 'laboratory', width: 150 }, - { text: 'Product ID', datafield: 'product_id', width: 120, menu: false }, - { text: 'Gist naam', datafield: 'name', menu: false }, - { text: 'Type', datafield: 'type', align: 'center', cellsalign: 'center', width: 110 }, - { text: 'Vorm', datafield: 'form', align: 'center', cellsalign: 'center', width: 110 }, - { text: 'SVG', datafield: 'attenuation', width: 70, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'p1' }, - { text: 'Tol%', datafield: 'tolerance', width: 60, align: 'right', cellsalign: 'right', menu: false, + { text: 'Laboratorium', datafield: 'laboratory', width: 150, filtertype: 'list' }, + { text: 'Product ID', datafield: 'product_id', width: 120, filtertype: 'textbox' }, + { text: 'Gist naam', datafield: 'name', filtertype: 'textbox' }, + { text: 'Type', datafield: 'type', align: 'center', cellsalign: 'center', width: 110, filtertype: 'list' }, + { text: 'Vorm', datafield: 'form', align: 'center', cellsalign: 'center', width: 110, filtertype: 'list' }, + { text: 'SVG', datafield: 'attenuation', width: 70, align: 'right', cellsalign: 'right', cellsformat: 'p1', filtertype: 'number' }, + { text: 'Tol%', datafield: 'tolerance', width: 60, align: 'right', cellsalign: 'right', filtertype: 'number', cellsrenderer: function(index, datafield, value, defaultvalue, column, rowdata) { var amount = ''; if (value > 0) @@ -307,7 +307,7 @@ return '' + amount + ''; } }, - { text: 'Voorraad', datafield: 'inventory', width: 100, align: 'right', menu: false, + { text: 'Voorraad', datafield: 'inventory', width: 100, align: 'right', filtertype: 'number', filtercondition: 'not_equal', cellsrenderer: function(index, datafield, value, defaultvalue, column, rowdata) { var amount = ''; if (value > 0) { @@ -323,7 +323,7 @@ return '' + amount + ''; } }, - { text: '', datafield: 'Edit', columntype: 'button', width: 100, align: 'center', menu: false, cellsrenderer: function() { + { text: '', datafield: 'Edit', columntype: 'button', width: 100, align: 'center', filterable: false, cellsrenderer: function() { return 'Wijzig'; }, buttonclick: function(row) { // open the popup window when the user clicks a button. diff -r 89b7449d1fd9 -r 3ce3df681be0 www/js/profile_fermentation.js --- a/www/js/profile_fermentation.js Thu Jun 11 19:59:30 2020 +0200 +++ b/www/js/profile_fermentation.js Sat Jun 13 12:14:26 2020 +0200 @@ -79,9 +79,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); }, addrow: function(rowid, rowdata, position, commit) { @@ -96,9 +94,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); }, updaterow: function(rowid, rowdata, commit) { @@ -113,9 +109,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); } }, @@ -228,6 +222,9 @@ $('#inittemp_hi').jqxNumberInput({ max: 45 }); $('#fridgemode').jqxCheckBox({ theme: theme, height: 23, enableContainerClick: false }); + var localizationobj = {}; + localizationobj.filterchoosestring= "Keuze:"; + // initialize jqxGrid $('#jqxgrid').jqxGrid({ width: 1280, @@ -238,10 +235,10 @@ renderstatusbar: function(statusbar) { var container = $('
'); var addButton = $('
Nieuw
'); + 'src="images/add.png"/>Nieuw'); container.append(addButton); statusbar.append(container); - addButton.jqxButton({ theme: theme, width: 90, height: 20 }); + addButton.jqxButton({ theme: theme, width: 90, height: 17 }); // add new row. addButton.click(function(event) { editrow = -1; @@ -256,12 +253,16 @@ $('#popupWindow').jqxWindow('open'); }); }, - filterable: false, + ready: function () { + $("#jqxgrid").jqxGrid('localizestrings', localizationobj); + }, + filterable: true, + showfilterrow: true, columns: [ - { text: 'Vergisting profiel', datafield: 'name' }, - { text: 'Min. start °C', datafield: 'inittemp_lo', width: 120, align: 'right', cellsalign: 'right', cellsformat: 'f1' }, - { text: 'Max. start °C', datafield: 'inittemp_hi', width: 120, align: 'right', cellsalign: 'right', cellsformat: 'f1' }, - { text: 'Sensor', datafield: 'fridgemode', align: 'right', width: 80, + { text: 'Vergisting profiel', datafield: 'name', filtertype: 'textbox' }, + { text: 'Min. start °C', datafield: 'inittemp_lo', width: 120, align: 'right', cellsalign: 'right', cellsformat: 'f1', filtertype: 'number' }, + { text: 'Max. start °C', datafield: 'inittemp_hi', width: 120, align: 'right', cellsalign: 'right', cellsformat: 'f1', filtertype: 'number' }, + { text: 'Sensor', datafield: 'fridgemode', align: 'right', width: 80, filterable: false, cellsrenderer: function(row, columnfield, value, defaulthtml, column) { if (value == 0) return 'Bier'; @@ -269,8 +270,8 @@ return 'Koelkast'; } }, - { text: 'Stappen', datafield: 'totalsteps', width: 80, align: 'right', cellsalign: 'right' }, - { text: 'Tijdsduur', datafield: 'duration', width: 150, align: 'right', + { text: 'Stappen', datafield: 'totalsteps', width: 80, align: 'right', cellsalign: 'right', filterable: false }, + { text: 'Tijdsduur', datafield: 'duration', width: 150, align: 'right', filterable: false, cellsrenderer: function(row, columnfield, value, defaulthtml, column) { var show, days, hours; if (value < 24) { @@ -286,7 +287,7 @@ return '' + show + ''; } }, - { text: '', datafield: 'Edit', width: 100, align: 'center', columntype: 'button', cellsrenderer: + { text: '', datafield: 'Edit', width: 100, align: 'center', columntype: 'button', filterable: false, cellsrenderer: function() { return 'Wijzig'; }, buttonclick: function(row) { diff -r 89b7449d1fd9 -r 3ce3df681be0 www/js/profile_mash.js --- a/www/js/profile_mash.js Thu Jun 11 19:59:30 2020 +0200 +++ b/www/js/profile_mash.js Sat Jun 13 12:14:26 2020 +0200 @@ -257,6 +257,10 @@ // initialize the input fields. $('#name').jqxInput({ theme: theme, width: 480, height: 23 }); $('#notes').jqxInput({ theme: theme, width: 800, height: 100 }); + + var localizationobj = {}; + localizationobj.filterchoosestring= "Keuze:"; + // initialize jqxGrid $('#jqxgrid').jqxGrid({ width: 1280, @@ -267,14 +271,14 @@ renderstatusbar: function(statusbar) { var container = $('
'); var addButton = $('
Add
'); + 'src="images/add.png"/>Add'); var expButton = $('
Export
'); + 'src="images/database.png"/>Export'); container.append(addButton); container.append(expButton); statusbar.append(container); - addButton.jqxButton({ theme: theme, width: 90, height: 20 }); - expButton.jqxButton({ theme: theme, width: 90, height: 20 }); + addButton.jqxButton({ theme: theme, width: 90, height: 17 }); + expButton.jqxButton({ theme: theme, width: 90, height: 17 }); // add new row. addButton.click(function(event) { editrow = -1; @@ -287,10 +291,15 @@ window.open('export_mashs.php'); }); }, + ready: function () { + $("#jqxgrid").jqxGrid('localizestrings', localizationobj); + }, + filterable: true, + showfilterrow: true, columns: [ - { text: 'Maish schema', datafield: 'name', width: 250 }, - { text: 'Opmerkingen', datafield: 'notes' }, - { text: '', datafield: 'Edit', width: 100, align: 'center', columntype: 'button', + { text: 'Maish schema', datafield: 'name', width: 250, filtertype: 'textbox' }, + { text: 'Opmerkingen', datafield: 'notes', filtertype: 'textbox' }, + { text: '', datafield: 'Edit', width: 100, align: 'center', columntype: 'button', filterable: false, cellsrenderer: function() { return 'Wijzig'; }, buttonclick: function(row) { diff -r 89b7449d1fd9 -r 3ce3df681be0 www/js/profile_styles.js --- a/www/js/profile_styles.js Thu Jun 11 19:59:30 2020 +0200 +++ b/www/js/profile_styles.js Sat Jun 13 12:14:26 2020 +0200 @@ -1,9 +1,9 @@ /***************************************************************************** - * Copyright (C) 2014-2019 + * Copyright (C) 2014-2020 * * Michiel Broek * - * This file is part of BrewCloud + * This file is part of Brewery Management System * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -89,9 +89,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); }, addrow: function(rowid, rowdata, position, commit) { @@ -106,9 +104,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); }, updaterow: function(rowid, rowdata, commit) { @@ -123,14 +119,12 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); } }, dataAdapter = new $.jqx.dataAdapter(source), - editrow = -1; + editrow = -1; // initialize the input fields. $('#name').jqxInput({ theme: theme, width: 320, height: 23 }); @@ -172,6 +166,9 @@ $('#ingredients').jqxInput({ theme: theme, width: 800, height: 23 }); $('#examples').jqxInput({ theme: theme, width: 800, height: 48 }); + var localizationobj = {}; + localizationobj.filterchoosestring= "Keuze:"; + // initialize jqxGrid $('#jqxgrid').jqxGrid({ width: 1280, @@ -183,18 +180,18 @@ var container, addButton, impButton; container = $('
'); addButton = $('
Nieuw
'); + 'src="images/add.png"/>Nieuw'); impButton = $('
Import
'); + 'src="images/add.png"/>Import'); expButton = $('
Export
'); + 'src="images/database.png"/>Export'); container.append(addButton); container.append(impButton); container.append(expButton); statusbar.append(container); - addButton.jqxButton({ theme: theme, width: 90, height: 20 }); - impButton.jqxButton({ theme: theme, width: 90, height: 20 }); - expButton.jqxButton({ theme: theme, width: 90, height: 20 }); + addButton.jqxButton({ theme: theme, width: 90, height: 17 }); + impButton.jqxButton({ theme: theme, width: 90, height: 17 }); + expButton.jqxButton({ theme: theme, width: 90, height: 17 }); // add new row. addButton.click(function(event) { editrow = -1; @@ -229,25 +226,28 @@ window.open('export_styles.php'); }); }, + ready: function () { + $("#jqxgrid").jqxGrid('localizestrings', localizationobj); + }, filterable: true, - filtermode: 'excel', + showfilterrow: true, columns: [ - { text: 'Gids', datafield: 'style_guide', width: 100 }, - { text: 'Groep', datafield: 'style_letter', width: 30 }, - { text: 'Style Name', menu: false, datafield: 'name' }, - { text: 'OG', menu: false, datafield: 'og_min', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f3' }, - { text: 'OG', menu: false, datafield: 'og_max', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f3' }, - { text: 'FG', menu: false, datafield: 'fg_min', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f3' }, - { text: 'FG', menu: false, datafield: 'fg_max', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f3' }, - { text: 'IBU', menu: false, datafield: 'ibu_min', width: 50, align: 'right', cellsalign: 'right', cellsformat: 'f0' }, - { text: 'IBU', menu: false, datafield: 'ibu_max', width: 50, align: 'right', cellsalign: 'right', cellsformat: 'f0' }, - { text: 'EBC', menu: false, datafield: 'color_min', width: 50, align: 'right', cellsalign: 'right', cellsformat: 'f0' }, - { text: 'EBC', menu: false, datafield: 'color_max', width: 50, align: 'right', cellsalign: 'right', cellsformat: 'f0' }, - { text: 'Co2', menu: false, datafield: 'carb_min', width: 50, align: 'right', cellsalign: 'right', cellsformat: 'f1' }, - { text: 'Co2', menu: false, datafield: 'carb_max', width: 50, align: 'right', cellsalign: 'right', cellsformat: 'f1' }, - { text: 'ABV', menu: false, datafield: 'abv_min', width: 50, align: 'right', cellsalign: 'right', cellsformat: 'f1' }, - { text: 'ABV', menu: false, datafield: 'abv_max', width: 50, align: 'right', cellsalign: 'right', cellsformat: 'f1' }, - { text: '', menu: false, datafield: 'Edit', width: 100, align: 'center', columntype: 'button', cellsrenderer: function() { + { text: 'Gids', datafield: 'style_guide', width: 100, filtertype: 'list' }, + { text: 'Groep', datafield: 'style_letter', width: 30, filtertype: 'list' }, + { text: 'Style Name', menu: false, datafield: 'name', filtertype: 'textbox' }, + { text: 'OG', menu: false, datafield: 'og_min', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f3', filterable: false }, + { text: 'OG', menu: false, datafield: 'og_max', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f3', filterable: false }, + { text: 'FG', menu: false, datafield: 'fg_min', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f3', filterable: false }, + { text: 'FG', menu: false, datafield: 'fg_max', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f3', filterable: false }, + { text: 'IBU', menu: false, datafield: 'ibu_min', width: 50, align: 'right', cellsalign: 'right', cellsformat: 'f0', filterable: false }, + { text: 'IBU', menu: false, datafield: 'ibu_max', width: 50, align: 'right', cellsalign: 'right', cellsformat: 'f0', filterable: false }, + { text: 'EBC', menu: false, datafield: 'color_min', width: 50, align: 'right', cellsalign: 'right', cellsformat: 'f0', filterable: false }, + { text: 'EBC', menu: false, datafield: 'color_max', width: 50, align: 'right', cellsalign: 'right', cellsformat: 'f0', filterable: false }, + { text: 'Co2', menu: false, datafield: 'carb_min', width: 50, align: 'right', cellsalign: 'right', cellsformat: 'f1', filterable: false }, + { text: 'Co2', menu: false, datafield: 'carb_max', width: 50, align: 'right', cellsalign: 'right', cellsformat: 'f1', filterable: false }, + { text: 'ABV', menu: false, datafield: 'abv_min', width: 50, align: 'right', cellsalign: 'right', cellsformat: 'f1', filterable: false }, + { text: 'ABV', menu: false, datafield: 'abv_max', width: 50, align: 'right', cellsalign: 'right', cellsformat: 'f1', filterable: false }, + { text: '', menu: false, datafield: 'Edit', width: 100, align: 'center', columntype: 'button', filterable: false, cellsrenderer: function() { return 'Wijzig'; }, buttonclick: function(row) { // open the popup window when the user clicks a button. diff -r 89b7449d1fd9 -r 3ce3df681be0 www/js/profile_water.js --- a/www/js/profile_water.js Thu Jun 11 19:59:30 2020 +0200 +++ b/www/js/profile_water.js Sat Jun 13 12:14:26 2020 +0200 @@ -3,7 +3,7 @@ * * Michiel Broek * - * This file is part of BrewCloud + * This file is part of Brewery Management System * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -77,9 +77,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); }, addrow: function(rowid, rowdata, position, commit) { @@ -94,9 +92,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); }, updaterow: function(rowid, rowdata, commit) { @@ -111,9 +107,7 @@ commit(true); location.reload(true); }, - error: function(jqXHR, textStatus, errorThrown) { - commit(false); - } + error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); } }, @@ -156,10 +150,10 @@ renderstatusbar: function(statusbar) { var container = $('
'), addButton = $('
Nieuw
'); + 'src="images/add.png"/>Nieuw'); container.append(addButton); statusbar.append(container); - addButton.jqxButton({ theme: theme, width: 90, height: 20 }); + addButton.jqxButton({ theme: theme, width: 90, height: 17 }); // add new row. addButton.click(function(event) { editrow = -1;