From 18edd7619defa906d8ab1aa0c2d5898e13705d1a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 17 Oct 2024 10:00:34 +0200 Subject: [PATCH] Bug 33484: Add 'Copied!' tooltip when the button is clicked Signed-off-by: Pedro Amorim Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize --- koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc | 2 +- koha-tmpl/intranet-tmpl/prog/js/datatables.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc index ea6323089c4..fdc33745691 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc @@ -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'); } }, } diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js index c6c510faaf0..5a791a0fc93 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -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'); } }, } -- 2.34.1