MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / showReportContextMenu

Function showReportContextMenu

deployments/desktop/static/desktop.js:2787–2800  ·  view source on GitHub ↗
(reportId, x, y)

Source from the content-addressed store, hash-verified

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;

Callers 1

bindEventsFunction · 0.85

Calls 2

ensureReportContextMenuFunction · 0.85
reportContextLabelsFunction · 0.85

Tested by

no test coverage detected