Bug 31962: Add tooltip to 'configure' on datatable controls
authorKatrin Fischer <katrin.fischer.83@web.de>
Fri, 6 Jan 2023 21:04:54 +0000 (21:04 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 31 Jan 2023 13:49:34 +0000 (10:49 -0300)
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 <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc
koha-tmpl/intranet-tmpl/prog/js/datatables.js

index 8df6eb5..d3f3b6e 100644 (file)
@@ -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: '<i class="fa fa-lg fa-wrench"></i> <span class="dt-button-text">' + _("Configure") + '</span>',
                 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;
 }
index 0fbb9b6..378fea1 100644 (file)
@@ -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: '<i class="fa fa-lg fa-wrench"></i> <span class="dt-button-text">' + __("Configure") + '</span>',
                     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;