2
0
forked from Wavyzz/dolibarr

Merge pull request #10780 from atm-john/theme_sidebarr_toggle

NEW/FIX Theme sidebarr toggle
This commit is contained in:
Laurent Destailleur
2019-03-15 19:41:39 +01:00
committed by GitHub
4 changed files with 43 additions and 13 deletions

View File

@@ -7191,11 +7191,10 @@ 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() {';
print 'jQuery(".menuhider").click(function(event) {';
print ' if(!$( "body" ).hasClass( "sidebar-collapse" )){ event.preventDefault(); }'."\n";
print ' console.log("We click on .menuhider");'."\n";
//print " $('.side-nav').animate({width:'toggle'},200);\n"; // OK with eldy theme but not with md
print " $('.side-nav').toggle()\n";
print " $('.login_block').toggle()\n";
print " $('body').toggleClass('sidebar-collapse')\n";
print '});'."\n";
}