diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 81558e28552..0cdb2d73284 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -7180,7 +7180,7 @@ function printCommonFooter($zone = 'private') print "\n"; print '/* JS CODE TO ENABLE to manage handler to switch left menu page (menuhider) */'."\n"; print 'jQuery(".menuhider").click(function(event) {'; - print ' if(!$( "body" ).hasClass( "sidebar-collapse" )){ event.preventDefault(); }'."\n"; + print ' if (!$( "body" ).hasClass( "sidebar-collapse" )){ event.preventDefault(); }'."\n"; print ' console.log("We click on .menuhider");'."\n"; print ' $("body").toggleClass("sidebar-collapse")'."\n"; print '});'."\n"; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 9919901ee3e..200cd1c7dd5 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1091,12 +1091,14 @@ if (! function_exists("llxHeader")) // html header top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); - //if ($conf->browser->layout == 'phone') - //{ - $morecssonbody.= ' sidebar-collapse'; - //} + $tmpcsstouse='sidebar-collapse'.($morecssonbody?' '.$morecssonbody:''); + // If theme MD and classic layer, we open the menulayer by default. + if ($conf->theme == 'md' && ! in_array($conf->browser->layout, array('phone','tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) + { + $tmpcsstouse=$morecssonbody; + } - print '' . "\n"; + print '' . "\n"; // top menu and left menu area if (empty($conf->dol_hide_topmenu) || GETPOST('dol_invisible_topmenu', 'int')) diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index b57946de4fb..e5f0b54e6e7 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1771,6 +1771,7 @@ div.mainmenu.members { div.mainmenu.menu { background-image: url(); top: 7px; + left: 5px; } div.mainmenu.products { @@ -1884,6 +1885,10 @@ foreach($mainmenuusedarray as $val) a.tmenuimage { display: block; } +a.tmenuimage:focus { + outline: none; +} + /* Login */ @@ -5668,6 +5673,10 @@ border-top-right-radius: 6px; } } +.menuhider { + width: 40px; +} + /* nboftopmenuentries = , fontsize= */ /* disableimages = */ /* rule to reduce top menu - 1st reduction */ @@ -5688,7 +5697,7 @@ border-top-right-radius: 6px; margin-top: 0px; } li.tmenu, li.tmenusel { - min-width: 32px; + min-width: 34px; } div.mainmenu { min-width: auto;