Fix: was using bad params and not complete.
This commit is contained in:
parent
06fc0eec5b
commit
b4c4211b98
@ -1148,20 +1148,22 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
// jQuery jMobile
|
// jQuery jMobile
|
||||||
if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || (! empty($conf->dol_use_jmobile) && $conf->dol_use_jmobile > 0))
|
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.
|
// Note: We can force not using ajax because cache of jquery does not load js of other pages by setting ajaxEnabled.
|
||||||
// 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)
|
if (empty($conf->dol_use_jmobile) || $conf->dol_use_jmobile != 2)
|
||||||
{
|
{
|
||||||
print '<script type="text/javascript">
|
print '<script type="text/javascript">
|
||||||
$(document).bind("mobileinit", function(){
|
$(document).bind("mobileinit", function(){
|
||||||
$.extend( $.mobile , {
|
$.extend( $.mobile , {
|
||||||
ajaxFormsEnabled : false,
|
autoInitializePage : true, /* We need this to run jmobile */
|
||||||
ajaxLinksEnabled : false, /* old param */
|
/* loadingMessage : \'xxxxx\', */
|
||||||
ajaxEnabled : false /* new param */
|
touchOverflowEnabled : true,
|
||||||
});
|
defaultPageTransition : \'none\',
|
||||||
});
|
defaultDialogTransition : \'none\',
|
||||||
</script>';
|
ajaxEnabled : false /* old param was ajaxFormsEnabled and ajaxLinksEnabled */
|
||||||
}
|
});
|
||||||
|
});
|
||||||
|
</script>';
|
||||||
|
}
|
||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js"></script>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user