Bugzilla – Attachment 180336 Details for
Bug 36275
The displayed values for 'client ID' and 'secret' need copy to clipboard buttons when managing API keys in patron accounts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36275: (follow-up) Add tooltip feedback
Bug-36275-follow-up-Add-tooltip-feedback.patch (text/plain), 2.15 KB, created by
Owen Leonard
on 2025-04-02 13:03:24 UTC
(
hide
)
Description:
Bug 36275: (follow-up) Add tooltip feedback
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2025-04-02 13:03:24 UTC
Size:
2.15 KB
patch
obsolete
>From 1a324692b749fcaa7687b8f6f9d74523cf1cf23f Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 2 Apr 2025 13:00:30 +0000 >Subject: [PATCH] Bug 36275: (follow-up) Add tooltip feedback > >This patch adds some code to the copytoClipBoard function so that it >triggers a Bootstrap tooltip with the text "Copied to clipboard", >providing feedback to the user that something has happened. > >The tooltip self-destructs after a few seconds. >--- > .../prog/en/includes/copy-to-clipboard-button.inc | 4 +++- > koha-tmpl/intranet-tmpl/prog/js/copyToClipboard.js | 8 ++++++++ > 2 files changed, 11 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/copy-to-clipboard-button.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/copy-to-clipboard-button.inc >index 2c5f5746d91..adfca8d67be 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/copy-to-clipboard-button.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/copy-to-clipboard-button.inc >@@ -1 +1,3 @@ >-<button type="button" class="btn btn-xs btn-primary" data-copy-to-clipboard data-value="[% copy_to_clipboard_value | html %]"> <i class="fa-solid fa-clipboard"></i> Copy to clipboard </button> >+<button type="button" class="btn btn-xs btn-primary" data-bs-placement="right" data-bs-delay='{"show":0,"hide":2000}' data-copy-to-clipboard data-value="[% copy_to_clipboard_value | html %]"> >+ <i class="fa-solid fa-clipboard"></i> Copy to clipboard >+</button> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/copyToClipboard.js b/koha-tmpl/intranet-tmpl/prog/js/copyToClipboard.js >index e339958273e..e82ee8ceb32 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/copyToClipboard.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/copyToClipboard.js >@@ -14,6 +14,14 @@ > } > > navigator.clipboard.writeText(value); >+ >+ target.title = __("Copied to clipboard"); >+ const tooltip = bootstrap.Tooltip.getOrCreateInstance(target); >+ tooltip.show(); >+ setTimeout(() => { >+ tooltip.dispose(); >+ target.title = ""; >+ }, 3000); > }; > > copyToClipboardButtons.forEach(copyToClipboardButton => { >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36275
:
180263
|
180299
|
180307
|
180336
|
180339
|
180352
|
180368
|
180369
|
180370
|
180405
|
180406
|
180407
|
180448
|
180449
|
180450