(reportId, x, y)
| 2785 | } |
| 2786 | |
| 2787 | function showReportContextMenu(reportId, x, y) { |
| 2788 | if (!reportId) return; |
| 2789 | const menu = ensureReportContextMenu(); |
| 2790 | const labels = reportContextLabels(reportId); |
| 2791 | menu.dataset.reportId = reportId; |
| 2792 | menu.querySelector('[data-report-menu-action="highlight"]').textContent = labels.highlight; |
| 2793 | menu.querySelector('[data-report-menu-action="delete"]').textContent = labels.delete; |
| 2794 | menu.classList.remove("hidden"); |
| 2795 | const rect = menu.getBoundingClientRect(); |
| 2796 | const left = Math.min(Math.max(8, x), window.innerWidth - rect.width - 8); |
| 2797 | const top = Math.min(Math.max(8, y), window.innerHeight - rect.height - 8); |
| 2798 | menu.style.left = `${left}px`; |
| 2799 | menu.style.top = `${top}px`; |
| 2800 | } |
| 2801 | |
| 2802 | async function deleteReportCard(reportId) { |
| 2803 | if (!reportId) return; |
no test coverage detected