mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 10:49:00 +02:00
Only apply ClipboardJS to buttons with clipboard attribute.
This prevents the showing of a "Failed!" tooltip on all other buttons. Fixes issue #148.
This commit is contained in:
parent
8f288a9328
commit
d57377a143
1 changed files with 1 additions and 1 deletions
|
@ -536,7 +536,7 @@ $(document).on("ajaxUI:start ajaxUI:reload", function() {
|
|||
}
|
||||
|
||||
//@ts-ignore
|
||||
var clipboard = new ClipboardJS('.btn');
|
||||
var clipboard = new ClipboardJS('.btn[data-clipboard-target], .btn[data-clipboard-text], .btn[data-clipboard-action]');
|
||||
clipboard.on('success', function(e) {
|
||||
setTooltip(e.trigger, 'Copied!');
|
||||
hideTooltip(e.trigger);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue