diff -r 24749c296a50 -r f5d85af156ab www/js/set_simulators.js --- a/www/js/set_simulators.js Tue Apr 30 17:26:41 2024 +0200 +++ b/www/js/set_simulators.js Wed May 01 14:38:37 2024 +0200 @@ -271,7 +271,7 @@ modalOpacity: 0.40 }); $('#popupWindow').on('open', function() { - $('#dev_description').jqxInput('selectAll'); + $('#name').jqxInput('selectAll'); }); $('#Delete').jqxButton({ template: 'danger', width: '90px', theme: theme }); $('#Delete').click(function() { @@ -308,16 +308,30 @@ var data, row = { uuid: dataRecord.uuid, - type: $('#dev_type').val(), - direction: $('#dev_direction').val(), - value: parseInt($('#dev_value').jqxNumberInput('decimal')), - offset: parseInt($('#dev_offset').jqxNumberInput('decimal')), - present: $('#dev_present').val(), - address: $('#dev_address').val(), - subdevice: parseInt($('#dev_subdevice').jqxNumberInput('decimal')), - gpiopin: parseInt($('#dev_gpiopin').jqxNumberInput('val')), - description: $('#dev_description').val(), - comment: $('#dev_comment').val() + name: $('#name').val(), + volume_air: parseInt($('#volume_air').jqxNumberInput('decimal')), + volume_beer: parseInt($('#volume_beer').jqxNumberInput('decimal')), + room_temperature: parseFloat($('#room_temperature').jqxNumberInput('decimal')), + room_humidity: parseFloat($('#room_humidity').jqxNumberInput('decimal')), + air_present: $('#air_present').val(), + beer_present: $('#beer_present').val(), + beer_present2: $('#beer_present2').val(), + chiller_present: $('#chiller_present').val(), + cooler_temp: parseFloat($('#cooler_temp').jqxNumberInput('decimal')), + cooler_time: parseInt($('#cooler_time').jqxNumberInput('decimal')), + cooler_size: parseFloat($('#cooler_size').jqxNumberInput('decimal')), + cooler_present: $('#cooler_present').val(), + cooler_power: parseInt($('#cooler_power').jqxNumberInput('decimal')), + heater_temp: parseFloat($('#heater_temp').jqxNumberInput('decimal')), + heater_time: parseInt($('#heater_time').jqxNumberInput('decimal')), + heater_size: parseFloat($('#heater_size').jqxNumberInput('decimal')), + heater_present: $('#heater_present').val(), + heater_power: parseInt($('#heater_power').jqxNumberInput('decimal')), + fan_present: $('#fan_present').val(), + fan_power: parseInt($('#fan_power').jqxNumberInput('decimal')), + light_present: $('#light_present').val(), + light_power: parseInt($('#light_power').jqxNumberInput('decimal')), + frigo_isolation: parseFloat($('#frigo_isolation').jqxNumberInput('decimal')) }; data = 'update=true&' + $.param(row); console.log(data); @@ -333,6 +347,7 @@ alert('Error: ' + data.msg); } else { console.log('update: success'); + $('#jqxgrid').jqxGrid('updatebounddata'); } }, error: function(jqXHR, textStatus, errorThrown) {}