Bug 27594: (QA follow-up): Display message only if copy worked
And check if writeText is available. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> (cherry picked from commit5fa5632b90) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commitdd2a60525d) Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
This commit is contained in:
parent
eec56d63bd
commit
5e4d0a2ffe
|
|
@ -434,11 +434,11 @@
|
|||
|
||||
$(".get-file").on("click", function(e){
|
||||
e.preventDefault();
|
||||
if( navigator.clipboard ){
|
||||
if( navigator.clipboard && navigator.clipboard.writeText){
|
||||
navigator.clipboard.writeText( $(this).attr("href") );
|
||||
$(this).attr("data-original-title", _( "Link copied to the clipboard" ) )
|
||||
.tooltip("show");
|
||||
}
|
||||
$(this).attr("data-original-title", _( "Link copied to the clipboard" ) )
|
||||
.tooltip("show");
|
||||
});
|
||||
$(".get-file").tooltip({
|
||||
delay: { "show": 100, "hide": 500 }
|
||||
|
|
|
|||
Loading…
Reference in New Issue