diff -r 5c30c8ef83a8 -r 22dd7ab614e5 www/js/set_devices.js --- a/www/js/set_devices.js Thu May 02 15:49:16 2024 +0200 +++ b/www/js/set_devices.js Fri May 03 14:14:01 2024 +0200 @@ -253,31 +253,29 @@ }); $('#Delete').jqxButton({ template: 'danger', width: '90px', theme: theme }); $('#Delete').click(function() { - if (editrow >= 0) { - // Open a popup to confirm this action. - $('#eventWindow').jqxWindow('open'); - $('#delOk').click(function() { - var data, - data = 'del=true&uuid=' + $('#dev_uuid').val(); - $.ajax({ - dataType: 'json', - url: url, - cache: false, - data: data, - type: 'POST', - success: function(data) { - if (data.error) { - console.log('del: ' + data.msg); - alert('Error: ' + data.msg); - } else { - console.log('del: success'); - } - }, - error: function(jqXHR, textStatus, errorThrown) {} - }); - $('#jqxgrid').jqxGrid('updatebounddata'); + // Open a popup to confirm this action. + $('#eventWindow').jqxWindow('open'); + $('#delOk').click(function() { +// var data, + var data = 'del=true&uuid=' + $('#dev_uuid').val(); + $.ajax({ + dataType: 'json', + url: url, + cache: false, + data: data, + type: 'POST', + success: function(data) { + if (data.error) { + console.log('del: ' + data.msg); + alert('Error: ' + data.msg); + } else { + console.log('del: success'); + } + }, + error: function(jqXHR, textStatus, errorThrown) {} }); - } + $('#jqxgrid').jqxGrid('updatebounddata'); + }); $('#popupWindow').jqxWindow('hide'); }); $('#Cancel').jqxButton({ template: 'primary', width: '90px', theme: theme });