From e3c529d483172ae83721b7aee5aa4b06e7d5f4ab Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Sun, 20 Nov 2016 15:38:19 +0100 Subject: [PATCH] FIX javascript error when using on mobile/smartphone --- htdocs/core/lib/functions.lib.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index ae12bfe4f8b..0c4e30f7fca 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5389,11 +5389,14 @@ function printCommonFooter($zone='private') });'."\n"; print '});'."\n"; - print '<!-- Set handler to switch left menu page -->'."\n"; - print 'jQuery(".menuhider").click(function() {'; - print " $('.side-nav').toggle();"; - if ($conf->theme == 'md') print " $('.login_block').toggle();"; - print '});'."\n"; + if (empty($conf->dol_use_jmobile)) + { + print '<!-- Set handler to switch left menu page -->'."\n"; + print 'jQuery(".menuhider").click(function() {'; + print " $('.side-nav').toggle();"; + if ($conf->theme == 'md') print " $('.login_block').toggle();"; + print '});'."\n"; + } print '</script>'."\n"; } -- GitLab