diff -r adda48f710cd -r b0d484a5525e www/js/profile_mash.js --- a/www/js/profile_mash.js Sat Jan 26 19:25:10 2019 +0100 +++ b/www/js/profile_mash.js Sat Jan 26 22:01:11 2019 +0100 @@ -46,8 +46,7 @@ var url = "includes/db_profile_mash.php"; // tooltips $("#name").jqxTooltip({ content: 'De naam voor dit maisch profiel.' }); - $("#notes").jqxTooltip({ content: 'De uitgebreide opmerkingen over dit maich profiel.' }); - $("#grid").jqxTooltip({ content: 'De maisch stappen in dit profiel.'}); + $("#notes").jqxTooltip({ content: 'De uitgebreide opmerkingen over dit maisch profiel.' }); // prepare the data var source = { datatype: "json", @@ -68,6 +67,7 @@ url: url, cache: false, data: data, + type: "POST", success: function (data, status, xhr) { // delete command is executed. commit(true); @@ -84,6 +84,7 @@ url: url, cache: false, data: data, + type: "POST", success: function (data, status, xhr) { commit(true); }, @@ -99,6 +100,7 @@ url: url, cache: false, data: data, + type: "POST", success: function (data, status, xhr) { // update command is executed. commit(true); @@ -114,9 +116,9 @@ var editsteps = function (data) { var generaterow = function () { var row = {}; - row["step_name"] = "Stap 1"; - row["step_type"] = "Infusion"; - row["step_temp"] = 62.0; + row['step_name'] = "Stap 1"; + row['step_type'] = 0; + row['step_temp'] = 62.0; row['step_time'] = 20.0; row['ramp_time'] = 1.0; row['end_temp'] = 62.0; @@ -127,7 +129,7 @@ datatype: "local", datafields: [ { name: 'step_name', type: 'string' }, - { name: 'step_type', type: 'string' }, + { name: 'step_type', type: 'int' }, { name: 'step_temp', type: 'float' }, { name: 'step_time', type: 'float' }, { name: 'ramp_time', type: 'float' }, @@ -147,8 +149,9 @@ source: stepAdapter, theme: theme, selectionmode: 'singlerow', - editmode: 'selectedrow', + editmode: 'selectedcell', editable: true, + localization: getLocalization(), showtoolbar: true, rendertoolbar: function (toolbar) { var me = this; @@ -156,8 +159,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: "primary", theme: theme, width: 150 }); // create new row. $("#addrowbutton").on('click', function () { var datarow = generaterow(); @@ -175,9 +178,9 @@ }, columns: [ { text: 'Stap naam', datafield: 'step_name' }, - { text: 'Stap type', datafield: 'step_type', width: 120, columntype: 'dropdownlist', + { text: 'Stap type', datafield: 'step_type', width: 150, columntype: 'dropdownlist', createeditor: function (row, cellvalue, editor, celltext, cellwidth, cellheight) { - var dataSource = [ "Infusion", "Temperature", "Decoction" ]; + var dataSource = [ "0", "1", "2" ]; editor.jqxDropDownList({ source: dataSource, dropDownHeight: 95, @@ -225,7 +228,7 @@ }; // initialize the input fields. - $("#name").jqxInput({ theme: theme, width: 250, height: 23 }); + $("#name").jqxInput({ theme: theme, width: 480, height: 23 }); $("#notes").jqxInput({ theme: theme, width: 800, height: 100 }); var editrow = -1; // initialize jqxGrid @@ -241,12 +244,12 @@ var addButton = $("