mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-12-11 18:45:34 +00:00
UI - Real time - checkbox operations now realtime without reload
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user