From 90be880e519ca76513e6a8632560910020f7cd30 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 5 May 2023 02:28:48 +0200 Subject: [PATCH] Debug v18 (missing tooltip for shortcut on search) --- htdocs/core/class/html.form.class.php | 5 +++-- htdocs/core/menus/standard/eldy.lib.php | 1 - htdocs/main.inc.php | 27 ++++++++++++++++++++++--- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 09fb7e59fa8..f492e676003 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -8432,10 +8432,11 @@ class Form * @param int $callurlonselect If set to 1, some code is added so an url return by the ajax is called when value is selected. * @param string $placeholder String to use as placeholder * @param integer $acceptdelayedhtml 1 = caller is requesting to have html js content not returned but saved into global $delayedhtmlcontent (so caller can show it at end of page to avoid flash FOUC effect) + * @param string $textfortitle Text to show on title. * @return string HTML select string * @see selectArrayAjax(), ajax_combobox() in ajax.lib.php */ - public static function selectArrayFilter($htmlname, $array, $id = '', $moreparam = '', $disableFiltering = 0, $disabled = 0, $minimumInputLength = 1, $morecss = '', $callurlonselect = 0, $placeholder = '', $acceptdelayedhtml = 0) + public static function selectArrayFilter($htmlname, $array, $id = '', $moreparam = '', $disableFiltering = 0, $disabled = 0, $minimumInputLength = 1, $morecss = '', $callurlonselect = 0, $placeholder = '', $acceptdelayedhtml = 0, $textfortitle = '') { global $conf, $langs; global $delayedhtmlcontent; // Will be used later outside of this function @@ -8445,7 +8446,7 @@ class Form return ''; } - $out = ''; + $out = ''; $formattedarrayresult = array(); diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 733ad4ef51b..91d2f5a86b4 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -713,7 +713,6 @@ function print_end_menu_array() */ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabMenu, &$menu, $noout = 0, $forcemainmenu = '', $forceleftmenu = '', $moredata = null, $type_user = 0) { - global $user, $conf, $langs, $hookmanager; //var_dump($tabMenu); diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 3627f6821ba..594d0b6693e 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2877,7 +2877,18 @@ function top_menu_search() $arrayresult = null; include DOL_DOCUMENT_ROOT.'/core/ajax/selectsearchbox.php'; // This set $arrayresult - $searchInput = ''; + // accesskey is for Windows or Linux: ALT + key for chrome, ALT + SHIFT + KEY for firefox + // accesskey is for Mac: CTRL + key for all browsers + $stringforfirstkey = $langs->trans("KeyboardShortcut"); + if ($conf->browser->name == 'chrome') { + $stringforfirstkey .= ' ALT +'; + } elseif ($conf->browser->name == 'firefox') { + $stringforfirstkey .= ' ALT + SHIFT +'; + } else { + $stringforfirstkey .= ' CTL +'; + } + + $searchInput = ''; $defaultAction = ''; $buttonList = '