From 98d4443ebdc050776a9b585a8d6cb7a0cabdafac Mon Sep 17 00:00:00 2001 From: reecebrowne <74901996+reecebrowne@users.noreply.github.com> Date: Mon, 6 Jan 2025 17:43:52 +0000 Subject: [PATCH] Manual redact tooltips (#2614) # Description Added tooltips and translations to all visible buttons on manual redact ## Checklist - [ X] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [ X] I have performed a self-review of my own code - [ X] I have attached images of the change if it is UI based - [ X] I have commented my code, particularly in hard-to-understand areas - [ X] If my code has heavily changed functionality I have updated relevant docs on [Stirling-PDFs doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) - [X ] My changes generate no new warnings - [ X] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) --- src/main/resources/messages_en_GB.properties | 16 ++++ src/main/resources/static/css/general.css | 17 +++- .../static/pdfjs-legacy/css/viewer-redact.css | 10 +-- .../resources/templates/security/redact.html | 90 ++++++++++--------- 4 files changed, 83 insertions(+), 50 deletions(-) diff --git a/src/main/resources/messages_en_GB.properties b/src/main/resources/messages_en_GB.properties index 4a27fa77e..85495a6f1 100644 --- a/src/main/resources/messages_en_GB.properties +++ b/src/main/resources/messages_en_GB.properties @@ -588,11 +588,27 @@ autoRedact.submitButton=Submit redact.title=Manual Redaction redact.header=Manual Redaction redact.submit=Redact +redact.textBasedRedaction=Text based Redaction redact.pageBasedRedaction=Page-based Redaction redact.convertPDFToImageLabel=Convert PDF to PDF-Image (Used to remove text behind the box) redact.pageRedactionNumbers.title=Pages redact.pageRedactionNumbers.placeholder=(e.g. 1,2,8 or 4,7,12-16 or 2n-1) redact.redactionColor.title=Redaction Color +redact.export=Export +redact.upload=Upload +redact.boxRedaction=Box draw redaction +redact.zoom=Zoom +redact.zoomIn=Zoom in +redact.zoomOut=Zoom out +redact.nextPage=Next Page +redact.previousPage=Previous Page +redact.toggleSidebar=Toggle Sidebar +redact.showThumbnails=Show Thumbnails +redact.showDocumentOutline=Show Document Outline (double-click to expand/collapse all items) +redact.showAttatchments=Show Attachments +redact.showLayers=Show Layers (double-click to reset all layers to the default state) +redact.colourPicker=Colour Picker +redact.findCurrentOutlineItem=Find current outline item #showJS showJS.title=Show Javascript diff --git a/src/main/resources/static/css/general.css b/src/main/resources/static/css/general.css index d5948f99b..4b9d04013 100644 --- a/src/main/resources/static/css/general.css +++ b/src/main/resources/static/css/general.css @@ -126,4 +126,19 @@ input[data-autocompleted] { } .btn:hover .btn-tooltip { display: block; - } +} +.btn-primary:hover .btn-tooltip { + display: block; +} +.btn-success:hover .btn-tooltip { + display: block; +} +.btn-secondary:hover .btn-tooltip { + display: block; +} +.btn-toolbarButton:hover .btn-tooltip { + display: block; +} +.toolbarButton:hover .btn-tooltip { + display: block; +} diff --git a/src/main/resources/static/pdfjs-legacy/css/viewer-redact.css b/src/main/resources/static/pdfjs-legacy/css/viewer-redact.css index c8ba631ff..f19dcd1b0 100644 --- a/src/main/resources/static/pdfjs-legacy/css/viewer-redact.css +++ b/src/main/resources/static/pdfjs-legacy/css/viewer-redact.css @@ -4006,16 +4006,8 @@ body { color: var(--dialog-button-hover-color); } -.toolbarButton > span { - display: inline-block; - width: 0; - height: 0; - overflow: hidden; -} - :is(.toolbarButton, .secondaryToolbarButton, .dialogButton)[disabled] { - opacity: 0.5; -} + background-color : rgba(169, 201, 246, 0.5);} .splitToolbarButton > .toolbarButton:is(:hover, :focus-visible), .dropdownToolbarButton:hover { diff --git a/src/main/resources/templates/security/redact.html b/src/main/resources/templates/security/redact.html index f060211b9..2088ce4a9 100644 --- a/src/main/resources/templates/security/redact.html +++ b/src/main/resources/templates/security/redact.html @@ -86,23 +86,25 @@