Improve signature navigation and toolbar functionality

Enhanced signature navigation logic to track the last viewed signature (`_lastViewedSignatureId`) and enable cross-page navigation. Updated next/previous navigation to handle both signed and unsigned signatures, with automatic page changes and scrolling to the relevant element.

Added a signature counter to the toolbar, displaying total, signed, and unsigned counts. Improved `renderSignatureButtons()` to filter out applied signatures and updated `clearSignatureButtons()` to manage visibility based on the current page.

Integrated Blazor callbacks (`OnPageChangedBySignatureNav()` and `OnSignatureNavChanged`) for UI updates. Fixed visibility issues where applied signatures appeared on incorrect pages.
This commit is contained in:
2026-06-07 23:36:43 +02:00
parent 2cea284a9d
commit 7a7fc2f903
2 changed files with 74 additions and 20 deletions

View File

@@ -437,6 +437,14 @@ Our use case is **visual/image stamping** at specific page coordinates
| **14** | **2025-01-26** | **JavaScript: `pdfViewer.applySignature()` creates HTML overlay (230px box, #f8f9fa background)** |
| **14** | **2025-01-26** | **German date format: dd.MM.yyyy (e.g., 26.01.2025) via `toLocaleDateString('de-DE')`** |
| **14** | **2025-01-26** | **XSS protection: `escapeHtml()` function sanitizes user-provided text** |
| **15** | **2025-01-26** | **Fixed: Applied signatures now only visible on their respective pages (display: none on other pages)** |
| **15** | **2025-01-26** | **Fixed: `clearSignatureButtons()` now hides/shows applied signatures based on current page** |
| **15** | **2025-01-26** | **Added signature navigation toolbar: "Nächste Unterschrift" / "Vorherige Unterschrift" buttons** |
| **15** | **2025-01-26** | **Signature counter displays total/signed/unsigned counts (e.g., "2 / 5" with "3 offen" badge)** |
| **15** | **2025-01-26** | **Implemented cross-page signature navigation (auto page change + scroll to signature)** |
| **15** | **2025-01-26** | **JavaScript: `goToNextSignature()` and `goToPreviousSignature()` with Blazor callbacks** |
| **15** | **2025-01-26** | **Fixed: `renderSignatureButtons()` now filters out already-applied signatures** |
| **15** | **2025-01-26** | **Blazor callback: `OnPageChangedBySignatureNav()` triggers signature button re-rendering** |
---