Debug v18 (missing tooltip for shortcut on search)
This commit is contained in:
parent
a46ed98c81
commit
90be880e51
@ -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 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 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 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
|
* @return string HTML select string
|
||||||
* @see selectArrayAjax(), ajax_combobox() in ajax.lib.php
|
* @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 $conf, $langs;
|
||||||
global $delayedhtmlcontent; // Will be used later outside of this function
|
global $delayedhtmlcontent; // Will be used later outside of this function
|
||||||
@ -8445,7 +8446,7 @@ class Form
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$out = '<select type="text" id="'.$htmlname.'" class="'.$htmlname.($morecss ? ' ' . $morecss : '').'"'.($moreparam ? ' '.$moreparam : '').' name="'.$htmlname.'"><option></option></select>';
|
$out = '<select type="text"'.($textfortitle? ' title="'.dol_escape_htmltag($textfortitle).'"' : '').' id="'.$htmlname.'" class="'.$htmlname.($morecss ? ' ' . $morecss : '').'"'.($moreparam ? ' '.$moreparam : '').' name="'.$htmlname.'"><option></option></select>';
|
||||||
|
|
||||||
$formattedarrayresult = array();
|
$formattedarrayresult = array();
|
||||||
|
|
||||||
|
|||||||
@ -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)
|
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;
|
global $user, $conf, $langs, $hookmanager;
|
||||||
|
|
||||||
//var_dump($tabMenu);
|
//var_dump($tabMenu);
|
||||||
|
|||||||
@ -2877,7 +2877,18 @@ function top_menu_search()
|
|||||||
$arrayresult = null;
|
$arrayresult = null;
|
||||||
include DOL_DOCUMENT_ROOT.'/core/ajax/selectsearchbox.php'; // This set $arrayresult
|
include DOL_DOCUMENT_ROOT.'/core/ajax/selectsearchbox.php'; // This set $arrayresult
|
||||||
|
|
||||||
$searchInput = '<input name="search_all" id="top-global-search-input" class="dropdown-search-input search_component_input" placeholder="'.$langs->trans('Search').'" autocomplete="off">';
|
// 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 = '<input name="search_all"'.($stringforfirstkey ? ' title="'.dol_escape_htmltag($stringforfirstkey.' s').'"' : '').' accesskey="s" id="top-global-search-input" class="dropdown-search-input search_component_input" placeholder="'.$langs->trans('Search').'" autocomplete="off">';
|
||||||
|
|
||||||
$defaultAction = '';
|
$defaultAction = '';
|
||||||
$buttonList = '<div class="dropdown-global-search-button-list" >';
|
$buttonList = '<div class="dropdown-global-search-button-list" >';
|
||||||
@ -3057,12 +3068,22 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_
|
|||||||
}
|
}
|
||||||
|
|
||||||
$usedbyinclude = 1;
|
$usedbyinclude = 1;
|
||||||
|
|
||||||
$arrayresult = array();
|
$arrayresult = array();
|
||||||
include DOL_DOCUMENT_ROOT.'/core/ajax/selectsearchbox.php'; // This make initHooks('searchform') then set $arrayresult
|
include DOL_DOCUMENT_ROOT.'/core/ajax/selectsearchbox.php'; // This make initHooks('searchform') then set $arrayresult
|
||||||
|
|
||||||
if ($conf->use_javascript_ajax && empty($conf->global->MAIN_USE_OLD_SEARCH_FORM)) {
|
if ($conf->use_javascript_ajax && empty($conf->global->MAIN_USE_OLD_SEARCH_FORM)) {
|
||||||
$searchform .= $form->selectArrayFilter('searchselectcombo', $arrayresult, $selected, 'accesskey="s"', 1, 0, (empty($conf->global->MAIN_SEARCHBOX_CONTENT_LOADED_BEFORE_KEY) ? 1 : 0), 'vmenusearchselectcombo', 1, $langs->trans("Search"), 1);
|
// 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 +';
|
||||||
|
}
|
||||||
|
|
||||||
|
$searchform .= $form->selectArrayFilter('searchselectcombo', $arrayresult, $selected, 'accesskey="s"', 1, 0, (empty($conf->global->MAIN_SEARCHBOX_CONTENT_LOADED_BEFORE_KEY) ? 1 : 0), 'vmenusearchselectcombo', 1, $langs->trans("Search"), 1, $stringforfirstkey.' s');
|
||||||
} else {
|
} else {
|
||||||
if (is_array($arrayresult)) {
|
if (is_array($arrayresult)) {
|
||||||
foreach ($arrayresult as $key => $val) {
|
foreach ($arrayresult as $key => $val) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user