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

Function updateReadButtons

deployments/desktop/static/desktop.js:2423–2434  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2421 }
2422
2423 function updateReadButtons() {
2424 document.querySelectorAll('.paper-actions button[data-action="read"]').forEach((button) => {
2425 const number = Number(button.dataset.number);
2426 const reportKey = paperReportKey(number);
2427 const reportId = state.paperReports.get(reportKey);
2428 const isReading = state.paperReading.has(reportKey);
2429 button.disabled = isReading;
2430 button.textContent = isReading ? ui().papers.loading : reportId ? ui().papers.readReport : state.selected.has(number) ? ui().papers.readSelected : ui().papers.read;
2431 button.classList.toggle("loading", isReading);
2432 button.classList.toggle("ready", Boolean(reportId) && !isReading);
2433 });
2434 }
2435
2436 function setPaperDisposition(number, action) {
2437 const isSelected = action === "read" && state.selected.has(number);

Callers 1

updateSelectionSummaryFunction · 0.85

Calls 3

paperReportKeyFunction · 0.85
uiFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected