diff -r 7509f9ed5686 -r 57bc32b5f411 www/js/profile_setup.js --- a/www/js/profile_setup.js Wed Mar 04 20:04:50 2020 +0100 +++ b/www/js/profile_setup.js Thu Mar 05 16:34:03 2020 +0100 @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2019 + * Copyright (C) 2019-2020 * * Michiel Broek * @@ -47,7 +47,8 @@ { name: 'color_method', type: 'int' }, { name: 'brix_correction', type: 'float' }, { name: 'grain_absorbtion', type: 'float' }, - { name: 'default_water', type: 'string' } + { name: 'default_water', type: 'string' }, + { name: 'my_yeastlab', type: 'string' } ], url: url }, @@ -66,13 +67,13 @@ $('#ibu_method').val(dataRecord.ibu_method); $('#brix_correction').val(dataRecord.brix_correction); $('#grain_absorbtion').val(dataRecord.grain_absorbtion); + $('#default_water').jqxDropDownList('selectItem', dataRecord.default_water); + $('#my_yeastlab').jqxDropDownList('selectItem', dataRecord.my_yeastlab); }, loadError: function(jqXHR, status, error) { }, }); - dataAdapter.dataBind(); - // Tooltips $('#brewery_name').jqxTooltip({ content: 'De naam voor deze brouwerij.' }); $('#factor_mashhop').jqxTooltip({ content: 'Het efficientie percentage voor hop tijdens de maisch.' }); @@ -98,7 +99,7 @@ decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right' }); $('#factor_cryohop').jqxNumberInput({ inputMode: 'simple', theme: theme, width: 110, height: 23, min: -20, max: 150, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right' }); - $('#brix_correction').jqxNumberInput({ inputMode: 'simple', theme: theme, width: 110, height: 23, min: 1.00, max: 1.05, decimalDigits: 2, spinButtons: true }); + $('#brix_correction').jqxNumberInput({ inputMode: 'simple', theme: theme, width: 110, height: 23, min: 1.00, max: 1.09, decimalDigits: 2, spinButtons: true }); $('#grain_absorbtion').jqxNumberInput({ inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0.5, max: 1.1, decimalDigits: 2, spinButtons: true }); $('#color_method').jqxDropDownList({ theme: theme, @@ -127,7 +128,18 @@ dropDownWidth: 300, autoDropDownHeight: true }); - $('#default_water').jqxDropDownList('selectItem', dataRecord.default_water); + $('#my_yeastlab').jqxDropDownList({ + placeHolder: 'Mijn gist laboratorium:', + theme: theme, + source: yeastlablist, + valueMember: 'laboratory', + displayMember: 'laboratory', + width: 250, + dropDownHorizontalAlignment: 'right', + dropDownWidth: 300, + autoDropDownHeight: true + }); + dataAdapter.dataBind(); $('#Save').jqxButton({ template: 'success', width: '90px', theme: theme }); $('#Save').click(function() { @@ -145,7 +157,8 @@ ibu_method: $('#ibu_method').val(), brix_correction: parseFloat($('#brix_correction').jqxNumberInput('decimal')), grain_absorbtion: parseFloat($('#grain_absorbtion').jqxNumberInput('decimal')), - default_water: $('#default_water').val() + default_water: $('#default_water').val(), + my_yeastlab: $('#my_yeastlab').val() }; data = 'update=true&' + $.param(row); $.ajax({