diff --git a/htdocs/core/get_menudiv.php b/htdocs/core/get_menudiv.php index f320b7cc8eb..59ab4c9ecf3 100644 --- a/htdocs/core/get_menudiv.php +++ b/htdocs/core/get_menudiv.php @@ -50,8 +50,6 @@ $title=$langs->trans("Menu"); // URL http://mydolibarr/core/get_menudiv.php?dol_use_jmobile=1 can be used for tests $arrayofjs=array(); $arrayofcss=array(); -$arrayofjs=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js'); -$arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css'); top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); print '
'."\n"; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index c1aa388507c..5faed38279f 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -983,9 +983,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs // jQuery jMobile if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || ! empty($conf->dol_use_jmobile)) { - print ''."\n"; - //$arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css'); - print ''."\n"; + print ''."\n"; } } @@ -1149,11 +1147,22 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs } // jQuery jMobile if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || (! empty($conf->dol_use_jmobile) && $conf->dol_use_jmobile > 0)) - { + { + // We must force not using ajax because cache of jquery does not load js of other pages. + // This also increase seriously speed onto mobile device where complex js code is very slow and memory very low. + if (empty($conf->dol_use_jmobile) || $conf->dol_use_jmobile != 2) + { + print ''; + } print ''."\n"; - //$arrayofjs=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js'); - print ''."\n"; - print ''."\n"; } }