diff -r fda7286871f2 -r 318aab371497 www/js/profile_fermentation.js --- a/www/js/profile_fermentation.js Sun Jan 27 17:39:53 2019 +0100 +++ b/www/js/profile_fermentation.js Sun Jan 27 20:40:24 2019 +0100 @@ -50,8 +50,6 @@ $("#name").jqxTooltip({ content: 'De naam voor dit vergisting profiel.' }); $("#inittemp_lo").jqxTooltip({ content: 'De minimale begin temperatuur van dit profiel.' }); $("#inittemp_hi").jqxTooltip({ content: 'De maximale begin temperatuur van dit profiel.' }); -// $("#fridgemode").jqxTooltip({ content: 'Wanneer deze actief is dan wordt geregeld als koelkast op de lucht temperatuur sensor in plaats van op de bier sensor.' }); - $("#grid").jqxTooltip({ content: 'De maisch stappen in dit profiel.'}); // prepare the data var source = { datatype: "json", @@ -77,6 +75,7 @@ url: url, cache: false, data: data, + type: "POST", success: function (data, status, xhr) { // delete command is executed. commit(true); @@ -93,6 +92,7 @@ url: url, cache: false, data: data, + type: "POST", success: function (data, status, xhr) { commit(true); }, @@ -108,6 +108,7 @@ url: url, cache: false, data: data, + type: "POST", success: function (data, status, xhr) { // update command is executed. commit(true); @@ -166,8 +167,8 @@ toolbar.append(container); container.append(''); container.append(''); - $("#addrowbutton").jqxButton({ theme: theme, width: 150 }); - $("#deleterowbutton").jqxButton({ theme: theme, width: 150 }); + $("#addrowbutton").jqxButton({ template: "primary", theme: theme, width: 150 }); + $("#deleterowbutton").jqxButton({ template: "danger", theme: theme, width: 150 }); // create new row. $("#addrowbutton").on('click', function () { var datarow = generaterow(); @@ -185,7 +186,7 @@ }, columns: [ { text: 'Stap naam', datafield: 'name' }, - { text: 'Min temperatuur', datafield: 'target_lo', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'f1', + { text: 'Min. °C', datafield: 'target_lo', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'f1', validation: function (cell, value) { if (value < 0 || value > 40) { return { result: false, message: "De temperatuur moet tussen 0 en 40 zijn." }; @@ -193,7 +194,7 @@ return true; } }, - { text: 'Max temperatuur', datafield: 'target_hi', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'f1', + { text: 'Max. °C', datafield: 'target_hi', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'f1', validation: function (cell, value) { if (value < 0 || value > 40) { return { result: false, message: "De temperatuur moet tussen 0 en 40 zijn." }; @@ -220,15 +221,14 @@ } ] }); -// $("#grid").on('cellendedit', function (event) { -// $('#grid').jqxGrid('sortby', 'step_temp', 'asc'); -// }); }; // initialize the input fields. $("#name").jqxInput({ theme: theme, width: 640, height: 23 }); - $("#inittemp_lo").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 40, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 }); - $("#inittemp_hi").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 40, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 }); + $("#inittemp_lo").jqxNumberInput( Spin1dec5 ); + $("#inittemp_lo").jqxNumberInput({ max: 40 }); + $("#inittemp_hi").jqxNumberInput( Spin1dec5 ); + $("#inittemp_hi").jqxNumberInput({ max: 40 }); $("#fridgemode").jqxCheckBox({ theme: theme, height: 23, enableContainerClick: false }); var editrow = -1; @@ -245,28 +245,26 @@ var addButton = $("