Bug 33484: Add 'Copied!' tooltip when the button is clicked

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Jonathan Druart 2024-10-17 10:00:34 +02:00 committed by Katrin Fischer
parent 545b7a707a
commit 80e37da75f
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
2 changed files with 2 additions and 2 deletions

View File

@ -233,7 +233,7 @@ function KohaTable(id_selector, dt_parameters, table_settings, add_filters) {
let url = window.location.origin + window.location.pathname + '?' + searchParams.toString() + window.location.hash;
if( navigator.clipboard && navigator.clipboard.writeText){
navigator.clipboard.writeText( url );
// TODO Add tooltip "State copied to the clipboard"
$(node).tooltip({trigger: 'manual', title: _("Copied!")}).tooltip('show');
}
},
}

View File

@ -779,7 +779,7 @@ function _dt_buttons(params){
let url = window.location.origin + window.location.pathname + '?' + searchParams.toString() + window.location.hash;
if( navigator.clipboard && navigator.clipboard.writeText){
navigator.clipboard.writeText( url );
// TODO Add tooltip "State copied to the clipboard"
$(node).tooltip({trigger: 'manual', title: _("Copied!")}).tooltip('show');
}
},
}