From 095bf327816f882b778dcac8eb81bb5bc7a75a37 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 30 Jul 2025 16:44:36 +0100 Subject: [PATCH] Update selectors to use #qslprint_table for QSL print Replaced all occurrences of the '.qslprint' class selector with the more specific '#qslprint_table' ID selector for table row and checkbox operations. This improves selector accuracy and ensures the correct table is targeted for QSL print actions. --- assets/js/sections/qslprint.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/assets/js/sections/qslprint.js b/assets/js/sections/qslprint.js index 63ddde84..29beeb9f 100644 --- a/assets/js/sections/qslprint.js +++ b/assets/js/sections/qslprint.js @@ -149,19 +149,19 @@ function mark_qsl_sent(id, method) { $(document).on('change', '#checkBoxAll', function (event) { if (this.checked) { - $('.qslprint tbody tr').each(function (i) { - $(this).closest('tr').addClass('activeRow'); - $(this).closest('tr').find("input[type=checkbox]").prop("checked", true); + $('#qslprint_table tbody tr').each(function (i) { + $(this).addClass('activeRow'); + $(this).find("input[type=checkbox]").prop("checked", true); }); } else { - $('.qslprint tbody tr').each(function (i) { - $(this).closest('tr').removeClass('activeRow'); - $(this).closest('tr').find("input[type=checkbox]").prop("checked", false); + $('#qslprint_table tbody tr').each(function (i) { + $(this).removeClass('activeRow'); + $(this).find("input[type=checkbox]").prop("checked", false); }); } }); -$(document).on('click', '.qslprint input[type="checkbox"]', function() { +$(document).on('click', '#qslprint_table input[type="checkbox"]', function() { if ($(this).is(":checked")) { $(this).closest('tr').addClass('activeRow'); } else { @@ -170,7 +170,7 @@ $(document).on('click', '.qslprint input[type="checkbox"]', function() { }); function markSelectedQsos() { - var elements = $('.qslprint tbody input:checked'); + var elements = $('#qslprint_table tbody input:checked'); var nElements = elements.length; if (nElements == 0) { return; @@ -202,7 +202,7 @@ function markSelectedQsos() { } function removeSelectedQsos() { - var elements = $('.qslprint tbody input:checked'); + var elements = $('#qslprint_table tbody input:checked'); var nElements = elements.length; if (nElements == 0) { return;