From d0d65b39f21255fe07fd2d8abcb21b026e5f6190 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 28 Aug 2024 10:56:38 +0000 Subject: [PATCH] Bug 37748: (follow-up) Move tooltip initialization to staff-global.js This patch moves generic initializations of Bootstrap tooltips into staff-global.js. --- .../intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt | 2 -- koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt | 2 -- koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt | 2 -- .../intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt | 2 -- koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 1 - .../prog/en/modules/reports/guided_reports_start.tt | 2 -- koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt | 1 - koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js | 2 -- koha-tmpl/intranet-tmpl/prog/js/serials-toolbar.js | 1 - koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 1 + 10 files changed, 1 insertion(+), 15 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt index 264f96fbd8..375787a3f4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt @@ -567,8 +567,6 @@ $("#budgetsTabs li:eq([% tab | html %]) a").tab("show"); [% END %] - $('[data-bs-toggle="tooltip"]').tooltip(); - $("#activeperiodst,#inactiveperiodst").dataTable($.extend(true, {}, dataTablesDefaults, { "columnDefs": [ { "targets": [ -1 ], "orderable": false, "searchable": false }, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt index 686e6f4df2..11b61995f7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt @@ -764,8 +764,6 @@ e.preventDefault(); alert(_("This fund has sub funds. It cannot be deleted.")); }); - - $('[data-bs-toggle="tooltip"]').tooltip(); }); [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt index 3d5c1c79d7..add5ae79ed 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt @@ -345,8 +345,6 @@ $("#budget_est_"+budget_id).text($("#budget_tot_"+budget_id).prev().text()); $("#budget_est_"+budget_id).css("color","green"); }); - - $('[data-bs-toggle="tooltip"]').tooltip(); }); [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt index b46a9b4c7e..c2d5b2c3e8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt @@ -543,8 +543,6 @@ if ($filter_container.data('filter')) { $('#filter').val($filter_container.data('filter')); } - - $('[data-bs-toggle="tooltip"]').tooltip(); }); [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index 74c2e23570..b4cbc64bb9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -1625,7 +1625,6 @@ $("#return_date_remember").hide(); } }); - $('[data-bs-toggle="tooltip"]').tooltip(); $(".printcheckinslip").on("click", function(e){ e.preventDefault(); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 3a4ca5778c..098af5df0e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -1965,8 +1965,6 @@ load_group_subgroups(); [% END %] - $('[data-bs-toggle="tooltip"]').tooltip(); - $('#limit').change(function() { $('#limitselect').submit(); }); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt index 12f32a0c13..5dfdafdcce 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt @@ -528,7 +528,6 @@ }); if ( window.isSecureContext ) { - $('[data-bs-toggle="tooltip"]').tooltip(); $(".get-file").on("click", function(e){ e.preventDefault(); if( navigator.clipboard && navigator.clipboard.writeText){ diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js b/koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js index da01b81a1f..9b702933ae 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js +++ b/koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js @@ -84,6 +84,4 @@ $(document).ready(function() { "pagingType": "full", "autoWidth": false, }, stock_rotation_table_settings); - - $('[data-bs-toggle="tooltip"]').tooltip(); }); diff --git a/koha-tmpl/intranet-tmpl/prog/js/serials-toolbar.js b/koha-tmpl/intranet-tmpl/prog/js/serials-toolbar.js index a5952048c2..2ebaf6ad2f 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/serials-toolbar.js +++ b/koha-tmpl/intranet-tmpl/prog/js/serials-toolbar.js @@ -21,5 +21,4 @@ function popup(subscriptionid) { $("#mana-subscription-share").click(function() { window.location="subscription-detail.pl?subscriptionid=" + subscriptionid + "&op=share"; }); - $('[data-bs-toggle="tooltip"]').tooltip(); }); diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js index e7f32193e1..e357c8b398 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js +++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js @@ -373,6 +373,7 @@ $(document).ready(function () { $("#setlibrary_panel").removeClass("setlibrary_panel_open").html("").hide(); }); + $('[data-bs-toggle="tooltip"]').tooltip(); }); function removeLastBorrower() { -- 2.39.2