Stitch-styled PDF viewer + .icon-btn helper for modal icon buttons

The Anzeigen / Download / Löschen icons inside the documents modal
and the close X of every modal sit outside <table>, so the previous
"table button" reset didn't reach them — the global blue button
styling shone through.

- Introduce a generic `.icon-btn` class that mirrors the table reset
  (transparent background, no padding, inherit colour). The reset
  rule is now `table button, .icon-btn`.
- Tag the documents modal close button and the view/download/delete
  buttons inside each document card with `icon-btn`. Tailwind classes
  (`text-outline hover:text-primary` etc.) still win for colour.
- Rebuild the PDF viewer modal in Stitch style: clean white card,
  light header with picture_as_pdf glyph + title, body on a soft grey
  surface, footer with chevron navigation buttons and zoom icons.
  Toggle hidden/flex instead of the legacy `.show` class. Removed the
  matching .pdf-viewer-* / .pdf-nav-btn / .pdf-zoom-btn CSS that no
  longer applies.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
kerimatilganandClaude Opus 4.7 committed 2026-05-15 18:13:50 +02:00
1 parent 40bd1b8009
commit 45c0c0047f
2 files changed
+56 -157

No files matched your search

+9 -5
View File
@@ -825,15 +825,15 @@ async function showDocuments(schaltungId) {
</div>
<div class="flex items-center gap-xs shrink-0">
${showView ? `<button data-doc-action="view" data-id="${doc.id}" data-name="${safeName}" title="Anzeigen"
class="text-outline hover:text-primary transition-colors p-1">
class="icon-btn text-outline hover:text-primary transition-colors p-1">
<span class="material-symbols-outlined text-[20px]">visibility</span>
</button>` : ''}
<button data-doc-action="download" data-id="${doc.id}" title="Download"
class="text-outline hover:text-primary transition-colors p-1">
class="icon-btn text-outline hover:text-primary transition-colors p-1">
<span class="material-symbols-outlined text-[20px]">download</span>
</button>
<button data-doc-action="delete" data-id="${doc.id}" data-name="${safeName}" data-schaltung-id="${schaltungId}" title="Löschen"
class="text-outline hover:text-error transition-colors p-1">
class="icon-btn text-outline hover:text-error transition-colors p-1">
<span class="material-symbols-outlined text-[20px]">delete</span>
</button>
</div>
@@ -3487,7 +3487,9 @@ async function viewPdfDocument(documentId, filename) {
await renderPage(currentPage);
// Show modal
document.getElementById('pdfViewerModal').classList.add('show');
const m = document.getElementById('pdfViewerModal');
m.classList.remove('hidden');
m.classList.add('flex');
// Update navigation buttons
updateNavigationButtons();
@@ -3572,7 +3574,9 @@ function updateZoomLevel() {
}
function closePdfViewer() {
document.getElementById('pdfViewerModal').classList.remove('show');
const m = document.getElementById('pdfViewerModal');
m.classList.add('hidden');
m.classList.remove('flex');
// Cleanup
currentPdf = null;