mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
FIX use $conf->browser->os instead
This commit is contained in:
parent
3b9be97792
commit
48e85e6690
|
|
@ -2575,15 +2575,12 @@ function top_menu_quickadd()
|
|||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$tmp = getBrowserInfo($_SERVER["HTTP_USER_AGENT"]);
|
||||
$ostype = $tmp['browseros'];
|
||||
|
||||
$html = '';
|
||||
|
||||
// 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 ($ostype === 'macintosh') {
|
||||
if ($conf->browser->os === 'macintosh') {
|
||||
$stringforfirstkey .= ' CTL +';
|
||||
} else {
|
||||
if ($conf->browser->name == 'chrome') {
|
||||
|
|
@ -2617,7 +2614,7 @@ function top_menu_quickadd()
|
|||
|
||||
// Key map shortcut
|
||||
$(document).keydown(function(event){
|
||||
var ostype = "'.$ostype.'";
|
||||
var ostype = "'.$conf->browser->os.'";
|
||||
if (ostype === "macintosh") {
|
||||
if ( event.which === 65 && event.ctrlKey ) {
|
||||
console.log(\'control + a : trigger open quick add dropdown\');
|
||||
|
|
@ -2837,13 +2834,10 @@ function top_menu_bookmark()
|
|||
return $html;
|
||||
}
|
||||
|
||||
$tmp = getBrowserInfo($_SERVER["HTTP_USER_AGENT"]);
|
||||
$ostype = $tmp['browseros'];
|
||||
|
||||
// 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 ($ostype === 'macintosh') {
|
||||
if ($conf->browser->os === 'macintosh') {
|
||||
$stringforfirstkey .= ' CTL +';
|
||||
} else {
|
||||
if ($conf->browser->name == 'chrome') {
|
||||
|
|
@ -2891,7 +2885,7 @@ function top_menu_bookmark()
|
|||
|
||||
// Key map shortcut
|
||||
jQuery(document).keydown(function(event) {
|
||||
var ostype = "'.$ostype.'";
|
||||
var ostype = "'.$conf->browser->os.'";
|
||||
if (ostype === "macintosh") {
|
||||
if ( event.which === 66 && event.ctrlKey ) {
|
||||
console.log("Click on control + b : trigger open bookmark dropdown");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user