diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index c52186b5511c3..0db8df3e45893 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -972,41 +972,44 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
else print "
".$appli."";
print "\n";
+ $ext='';
+ if (! empty($conf->dol_use_jmobile)) $ext='version='.urlencode(DOL_VERSION);
+
if (! defined('DISABLE_JQUERY') && ! $disablejs && $conf->use_javascript_ajax)
{
print ''."\n";
$jquerytheme = 'smoothness';
if (!empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME;
- if (constant('JS_JQUERY_UI')) print ''."\n"; // JQuery
- else print ''."\n"; // JQuery
- print ''."\n"; // Tooltip
- print ''."\n"; // JNotify
+ if (constant('JS_JQUERY_UI')) print ''."\n"; // JQuery
+ else print ''."\n"; // JQuery
+ print ''."\n"; // Tooltip
+ print ''."\n"; // JNotify
/*if (! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD) || (defined('REQUIRE_JQUERY_FILEUPLOAD') && constant('REQUIRE_JQUERY_FILEUPLOAD'))) // jQuery fileupload
{
- print ''."\n";
+ print ''."\n";
}*/
if (! empty($conf->global->MAIN_USE_JQUERY_DATATABLES) || (defined('REQUIRE_JQUERY_DATATABLES') && constant('REQUIRE_JQUERY_DATATABLES'))) // jQuery datatables
{
- //print ''."\n";
- print ''."\n";
- print ''."\n";
- print ''."\n";
- //print ''."\n";
- print ''."\n";
+ //print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ //print ''."\n";
+ print ''."\n";
}
if (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || (defined('REQUIRE_JQUERY_MULTISELECT') && constant('REQUIRE_JQUERY_MULTISELECT'))) // jQuery multiselect
{
- print ''."\n";
+ 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') || ! empty($conf->dol_use_jmobile))
{
- print ''."\n";
+ print ''."\n";
}
}
@@ -1029,6 +1032,7 @@ 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;
+ $themeparam.=($ext?'&'.$ext:'');
if (! empty($_SESSION['dol_resetcache'])) $themeparam.='&dol_resetcache='.$_SESSION['dol_resetcache'];
if (GETPOST('dol_hide_topmenu')) { $themeparam.='&dol_hide_topmenu='.GETPOST('dol_hide_topmenu'); }
if (GETPOST('dol_hide_leftmenu')) { $themeparam.='&dol_hide_leftmenu='.GETPOST('dol_hide_leftmenu'); }
@@ -1068,63 +1072,61 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
}
}
- $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";
- else print ''."\n";
- if (constant('JS_JQUERY_UI')) print ''."\n";
- else print ''."\n";
- print ''."\n";
- print ''."\n";
+ if (constant('JS_JQUERY')) print ''."\n";
+ else print ''."\n";
+ if (constant('JS_JQUERY_UI')) print ''."\n";
+ else print ''."\n";
+ print ''."\n";
+ print ''."\n";
// jQuery Layout
if (! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) || defined('REQUIRE_JQUERY_LAYOUT'))
{
- print ''."\n";
+ print ''."\n";
}
// jQuery jnotify
if (empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY) && ! defined('DISABLE_JQUERY_JNOTIFY'))
{
- print ''."\n";
- print ''."\n";
+ print ''."\n";
+ print ''."\n";
}
// jQuery blockUI
if (! empty($conf->global->MAIN_USE_JQUERY_BLOCKUI) || defined('REQUIRE_JQUERY_BLOCKUI'))
{
- print ''."\n";
+ print ''."\n";
print ''."\n";
- print ''."\n";
+ print ''."\n";
}
// Flot
if (empty($conf->global->MAIN_DISABLE_JQUERY_FLOT))
{
if (constant('JS_JQUERY_FLOT'))
{
- print ''."\n";
- print ''."\n";
- print ''."\n";
- print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
}
else
{
- print ''."\n";
- print ''."\n";
- print ''."\n";
- print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
}
}
// jQuery jeditable
if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE))
{
- print ''."\n";
- print ''."\n";
- print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
print ''."\n";
- print ''."\n";
- print ''."\n";
+ print ''."\n";
+ print ''."\n";
}
// jQuery File Upload
/*
if (! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD) || (defined('REQUIRE_JQUERY_FILEUPLOAD') && constant('REQUIRE_JQUERY_FILEUPLOAD')))
{
- print ''."\n";
- print ''."\n";
- print ''."\n";
- print ''."\n";
- print ''."\n";
- print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
print ''."\n";
- print ''."\n";
+ print ''."\n";
}*/
// jQuery DataTables
if (! empty($conf->global->MAIN_USE_JQUERY_DATATABLES) || (defined('REQUIRE_JQUERY_DATATABLES') && constant('REQUIRE_JQUERY_DATATABLES')))
{
- print ''."\n";
- print ''."\n";
- print ''."\n";
- print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
}
// jQuery Multiselect
if (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || (defined('REQUIRE_JQUERY_MULTISELECT') && constant('REQUIRE_JQUERY_MULTISELECT')))
{
- print ''."\n";
+ print ''."\n";
}
// jQuery Timepicker
if (! empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER'))
{
- print ''."\n";
- print ''."\n";
+ print ''."\n";
+ print ''."\n";
}
// jQuery jMobile
if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || (! empty($conf->dol_use_jmobile) && $conf->dol_use_jmobile > 0))
@@ -1189,7 +1191,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
});
';
}
- if (empty($conf->dol_use_jmobile) || $conf->dol_use_jmobile != 3) print ''."\n";
+ if (empty($conf->dol_use_jmobile) || $conf->dol_use_jmobile != 3) print ''."\n";
}
}
@@ -1212,10 +1214,10 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
// Global js function
print ''."\n";
- print ''."\n";
+ print ''."\n";
// Add datepicker default options
- print ''."\n";
+ 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'))