diff --git a/build/debian/rules b/build/debian/rules
index 6b75c68b85d..5a1cfdc8ecb 100755
--- a/build/debian/rules
+++ b/build/debian/rules
@@ -104,7 +104,6 @@ clean:
rm -fr htdocs/includes/jquery/plugins/flot
rm -fr htdocs/includes/jquery/plugins/jstree
rm -fr htdocs/includes/jquery/plugins/lightbox
- rm -fr htdocs/includes/jquery/plugins/mobile
rm -fr htdocs/includes/jquery/plugins/multiselect
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PDF
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip
diff --git a/htdocs/core/getmenu_jmobile.php b/htdocs/core/getmenu_jmobile.php
index 78c46c60fbb..988dec4339a 100644
--- a/htdocs/core/getmenu_jmobile.php
+++ b/htdocs/core/getmenu_jmobile.php
@@ -50,7 +50,7 @@ $left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
* View
*/
-// URL http://mydolibarr/core/getmenu_jmobime?mainmenu=mainmenu&leftmenu=leftmenu can be used for tests
+// URL http://mydolibarr/core/getmenu_jmobile?mainmenu=mainmenu&leftmenu=leftmenu can be used for tests
$arrayofjs=array('/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js');
$arrayofcss=array('/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css');
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index c254f4a74db..bae7f0de7f2 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -647,9 +647,6 @@ if (! defined('NOLOGIN'))
$conf->css = "/theme/".$conf->theme."/style.css.php";
}
- // If theme support option like flip-hide left menu and we use a smartphone, we force it
- if (! empty($conf->global->MAIN_SMARTPHONE_OPTIM) && $conf->browser->phone && $conf->theme == 'eldy') $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT='forced';
-
// Set javascript option
if (! GETPOST('nojs')) // If javascript was not disabled on URL
{
@@ -949,6 +946,11 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
{
print ''."\n";
}
+ // jQuery jMobile
+ if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || GETPOST('jmobile'))
+ {
+ print ''."\n";
+ }
}
print ''."\n";
@@ -969,7 +971,9 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
}
$themeparam='?lang='.$langs->defaultlang.'&theme='.$conf->theme.(GETPOST('optioncss')?'&optioncss='.GETPOST('optioncss','alpha',1):'').'&userid='.$user->id.'&entity='.$conf->entity;
if (! empty($_SESSION['dol_resetcache'])) $themeparam.='&dol_resetcache='.$_SESSION['dol_resetcache'];
- //print 'themepath='.$themepath.' themeparam='.$themeparam;exit;
+ if (GETPOST('dol_hide_topmenu')) $themeparam.='&dol_hide_topmenu=1';
+ if (GETPOST('dol_hide_leftmenu')) $themeparam.='&dol_hide_leftmenu=1';
+ //print 'themepath='.$themepath.' themeparam='.$themeparam;exit;
print ''."\n";
// CSS forced by modules (relative url starting with /)
@@ -1005,11 +1009,11 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print ''."\n";
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print ''."\n";
- // Output standard javascript links
- if (! $disablejs && ! empty($conf->use_javascript_ajax))
- {
- $ext='.js';
+ $ext='.js';
+ // Output standard javascript links
+ if (! defined('DISABLE_JQUERY') && ! $disablejs && ! empty($conf->use_javascript_ajax))
+ {
// JQuery. Must be before other includes
print ''."\n";
if (constant('JS_JQUERY')) print ''."\n";
@@ -1101,6 +1105,21 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
{
print ''."\n";
}
+ // jQuery Timepicker
+ if (! empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER'))
+ {
+ print ''."\n";
+ print ''."\n";
+ }
+ // jQuery jMobile
+ if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || GETPOST('jmobile'))
+ {
+ print ''."\n";
+ }
+ }
+
+ if (! $disablejs && ! empty($conf->use_javascript_ajax))
+ {
// CKEditor
if (! empty($conf->fckeditor->enabled) && (empty($conf->global->FCKEDITOR_EDITORNAME) || $conf->global->FCKEDITOR_EDITORNAME == 'ckeditor'))
{
@@ -1115,11 +1134,6 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
print ''."\n";
print ''."\n";
}
- // jQuery Timepicker
- if (! empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER'))
- {
- print ''."\n";
- }
// Global js function
print ''."\n";
@@ -1128,12 +1142,6 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
// Add datepicker default options
print ''."\n";
- // add timepicker default options
- if (! empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER'))
- {
- print ''."\n";
- }
-
// JS forced by modules (relative url starting with /)
if (! empty($conf->modules_parts['js'])) // $conf->modules_parts['js'] is array('module'=>array('file1','file2'))
{
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index bf87c6cb0e0..19398105406 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -356,7 +356,7 @@ td.showDragHandle {
/* ============================================================================== */
div.fiche {
- margin-: global->MAIN_MENU_USE_JQUERY_LAYOUT))?((empty($_SESSION['dol_hide_leftmenu']) && ! GETPOST('dol_hide_leftmenu')) ?'20':'4'):'24')); ?>px;
+ margin-: global->MAIN_MENU_USE_JQUERY_LAYOUT))?((empty($_SESSION['dol_hide_leftmenu']) && ! GETPOST('dol_hide_leftmenu'))?'20':'4'):'24')); ?>px;
margin-: browser->phone)?'12':'6')); ?>px;
}