UI - Real time - checkbox operations now realtime without reload

This commit is contained in:
dgtlmoon
2025-06-03 14:54:13 +02:00
parent d5af91d8f7
commit 30e84f1030
4 changed files with 167 additions and 88 deletions

View File

@@ -18,6 +18,24 @@ $(document).ready(function () {
return false;
});
$('#checkbox-operations button').on('click.socketHandlerNamespace', function (e) {
e.preventDefault();
const op = $(this).val();
const checkedUuids = $('input[name="uuids"]:checked').map(function () {
return this.value.trim();
}).get();
console.log(`Socket.IO: Sending watch operation '${op}' for UUIDs:`, checkedUuids);
socket.emit('checkbox-operation', {
op: op,
uuids: checkedUuids,
extra_data: $('#op_extradata').val() // Set by the alert() handler
});
$('input[name="uuids"]:checked').prop('checked', false);
return false;
});
}