2
0
forked from Wavyzz/dolibarr

Fix: When jmobile is forced, we force enable of javascript.

This commit is contained in:
Laurent Destailleur
2014-08-08 14:37:51 +02:00
parent bceb72a9d1
commit d801bcc690
3 changed files with 9 additions and 2 deletions

View File

@@ -25,6 +25,9 @@ if (GETPOST('dol_optimize_smallscreen')) $conf->dol_optimize_smallscreen=1;
if (GETPOST('dol_no_mouse_hover')) $conf->dol_no_mouse_hover=1; if (GETPOST('dol_no_mouse_hover')) $conf->dol_no_mouse_hover=1;
if (GETPOST('dol_use_jmobile')) $conf->dol_use_jmobile=1; if (GETPOST('dol_use_jmobile')) $conf->dol_use_jmobile=1;
// If we force to use jmobile, then we reenable javascript
if (! empty($conf->dol_use_jmobile)) $conf->use_javascript_ajax=1;
$arrayofjs=array('/core/js/dst.js'.(empty($conf->dol_use_jmobile)?'':'?version='.urlencode(DOL_VERSION))); // Javascript code on logon page only to detect user tz, dst_observed, dst_first, dst_second $arrayofjs=array('/core/js/dst.js'.(empty($conf->dol_use_jmobile)?'':'?version='.urlencode(DOL_VERSION))); // Javascript code on logon page only to detect user tz, dst_observed, dst_first, dst_second
$titleofloginpage=$langs->trans('Login').' '.$title; // title is defined by dol_loginfunction in security2.lib.php $titleofloginpage=$langs->trans('Login').' '.$title; // title is defined by dol_loginfunction in security2.lib.php
print top_htmlhead('',$titleofloginpage,0,0,$arrayofjs); print top_htmlhead('',$titleofloginpage,0,0,$arrayofjs);
@@ -209,7 +212,7 @@ if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file
<!-- authentication mode = <?php echo $main_authentication ?> --> <!-- authentication mode = <?php echo $main_authentication ?> -->
<!-- cookie name used for this session = <?php echo $session_name ?> --> <!-- cookie name used for this session = <?php echo $session_name ?> -->
<!-- urlfrom in this session = <?php echo $_SESSION["urlfrom"] ?> --> <!-- urlfrom in this session = <?php echo isset($_SESSION["urlfrom"])?$_SESSION["urlfrom"]:''; ?> -->
<!-- Common footer is not used for login page, this is same than footer but inside login tpl --> <!-- Common footer is not used for login page, this is same than footer but inside login tpl -->

View File

@@ -25,6 +25,9 @@ if (GETPOST('dol_optimize_smallscreen')) $conf->dol_optimize_smallscreen=1;
if (GETPOST('dol_no_mouse_hover')) $conf->dol_no_mouse_hover=1; if (GETPOST('dol_no_mouse_hover')) $conf->dol_no_mouse_hover=1;
if (GETPOST('dol_use_jmobile')) $conf->dol_use_jmobile=1; if (GETPOST('dol_use_jmobile')) $conf->dol_use_jmobile=1;
// If we force to use jmobile, then we reenable javascript
if (! empty($conf->dol_use_jmobile)) $conf->use_javascript_ajax=1;
print top_htmlhead('',$langs->trans('Login').' '.$title); print top_htmlhead('',$langs->trans('Login').' '.$title);
?> ?>
<!-- BEGIN PHP TEMPLATE PASSWORDFORGOTTEN.TPL.PHP --> <!-- BEGIN PHP TEMPLATE PASSWORDFORGOTTEN.TPL.PHP -->

View File

@@ -722,7 +722,8 @@ if (! empty($conf->browser->phone))
$conf->dol_optimize_smallscreen=1; $conf->dol_optimize_smallscreen=1;
$conf->dol_no_mouse_hover=1; $conf->dol_no_mouse_hover=1;
} }
// If we force to use jmobile, then we reenable javascript
if (! empty($conf->dol_use_jmobile)) $conf->use_javascript_ajax=1;
// Disabled bugged themes // Disabled bugged themes
if (! empty($conf->dol_use_jmobile) && in_array($conf->theme,array('bureau2crea','cameleo'))) if (! empty($conf->dol_use_jmobile) && in_array($conf->theme,array('bureau2crea','cameleo')))
{ {