From 12ae2c59e7ba322ad2cce47c37138f374507b628 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Fri, 6 Jan 2023 21:04:54 +0000 Subject: [PATCH] Bug 31962: Add tooltip to 'configure' on datatable controls This makes sure that the last button on the datatable controls also has a tooltip, like the other buttons. To test: * Without the patch: * Check out an item and look at the table of checkouts * Look at the detail page of a record with at least one item * Confirm that the 'configure' button doesn't have a tooltip appear as a bubble like the other buttons * Apply patch * Restart_all and reload pages * Make sure the styling of the 'configure' tooltip now matches that of the other buttons Signed-off-by: David Nind Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- .../intranet-tmpl/prog/en/includes/columns_settings.inc | 5 +++-- koha-tmpl/intranet-tmpl/prog/js/datatables.js | 5 +++-- 2 files changed, 6 insertions(+), 4 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 8df6eb56cc..d3f3b6e005 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc @@ -165,7 +165,8 @@ function KohaTable(id_selector, dt_parameters, table_settings, add_filters) { dt_parameters[ "buttons" ].push( { className: "dt_button_configure_table", - titleAttr: _("Table settings"), + fade: 100, + titleAttr: _("Configure table"), text: ' ' + _("Configure") + '', action: function() { window.location = '/cgi-bin/koha/admin/columns_settings.pl?module=' + table_settings['module'] + '&page=' + table_settings['page'] + '&table=' + table_settings['table']; @@ -228,7 +229,7 @@ function KohaTable(id_selector, dt_parameters, table_settings, add_filters) { deactivate_filters(id_selector); } - $(".dt_button_clear_filter, .columns_controls, .export_controls").tooltip(); + $(".dt_button_clear_filter, .columns_controls, .export_controls, .dt_button_configure_table").tooltip(); return table; } diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js index 0fbb9b625c..378fea1054 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -823,7 +823,8 @@ jQuery.fn.dataTable.ext.errMode = function(settings, note, message) { settings[ "buttons" ].push( { className: "dt_button_configure_table", - titleAttr: __("Table settings"), + fade: 100, + titleAttr: __("Configure table"), text: ' ' + __("Configure") + '', action: function() { window.location = '/cgi-bin/koha/admin/columns_settings.pl?module=' + table_settings['module'] + '&page=' + table_settings['page'] + '&table=' + table_settings['table']; @@ -832,7 +833,7 @@ jQuery.fn.dataTable.ext.errMode = function(settings, note, message) { ); } - $(".dt_button_clear_filter, .columns_controls, .export_controls").tooltip(); + $(".dt_button_clear_filter, .columns_controls, .export_controls, .dt_button_configure_table").tooltip(); if ( add_filters ) { settings['orderCellsTop'] = true; -- 2.39.5