Fix js errors

This commit is contained in:
Laurent Destailleur
2017-02-23 02:51:26 +01:00
parent 0ada82baa0
commit 7673aff3ba
2 changed files with 3 additions and 3 deletions

View File

@@ -130,13 +130,12 @@ print '
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
/*jQuery time*/
$(document).ready(function(){ $(document).ready(function(){
$("body ul").click(function(){ $("body ul").click(function(){
console.log("We click on body ul"); console.log("We click on body ul");
$(this).siblings().find("li ul").slideUp(0); $(this).siblings().find("li ul").slideUp(0);
//slide up all the link lists
$(this).find("li ul").slideToggle(200); $(this).find("li ul").slideToggle(200);
target = $(this); target = $(this);

View File

@@ -1021,6 +1021,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
print '<meta name="robots" content="noindex'.($disablenofollow?'':',nofollow').'">'."\n"; // Do not index print '<meta name="robots" content="noindex'.($disablenofollow?'':',nofollow').'">'."\n"; // Do not index
print '<meta name="viewport" content="width=device-width, initial-scale=1.0">'; // Scale for mobile device print '<meta name="viewport" content="width=device-width, initial-scale=1.0">'; // Scale for mobile device
print '<meta name="author" content="Dolibarr Development Team">'."\n"; print '<meta name="author" content="Dolibarr Development Team">'."\n";
// Favicon. Note, even if we remove this meta, the browser and android webview try to find a favicon.ico
$favicon=dol_buildpath('/theme/'.$conf->theme.'/img/favicon.ico',1); $favicon=dol_buildpath('/theme/'.$conf->theme.'/img/favicon.ico',1);
if (! empty($conf->global->MAIN_FAVICON_URL)) $favicon=$conf->global->MAIN_FAVICON_URL; if (! empty($conf->global->MAIN_FAVICON_URL)) $favicon=$conf->global->MAIN_FAVICON_URL;
print '<link rel="shortcut icon" type="image/x-icon" href="'.$favicon.'"/>'."\n"; print '<link rel="shortcut icon" type="image/x-icon" href="'.$favicon.'"/>'."\n";
@@ -1041,7 +1042,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
//if (! empty($conf->dol_use_jmobile)) $ext='version='.urlencode(DOL_VERSION); //if (! empty($conf->dol_use_jmobile)) $ext='version='.urlencode(DOL_VERSION);
$ext='version='.urlencode(DOL_VERSION); $ext='version='.urlencode(DOL_VERSION);
if (GETPOST('version')) $ext='version='.GETPOST('version','int'); // usefull to force no cache on css/js if (GETPOST('version')) $ext='version='.GETPOST('version','int'); // usefull to force no cache on css/js
if (GETPOST('testmenuhider') || ! empty($conf->global->MAIN_TESTMENUHIDER)) $ext='testmenuhider='.GETPOST('testmenuhider','int'); if (GETPOST('testmenuhider') || ! empty($conf->global->MAIN_TESTMENUHIDER)) $ext.='&testmenuhider='.(GETPOST('testmenuhider')?GETPOST('testmenuhider','int'):$conf->global->MAIN_TESTMENUHIDER);
$themeparam='?lang='.$langs->defaultlang.'&amp;theme='.$conf->theme.(GETPOST('optioncss')?'&amp;optioncss='.GETPOST('optioncss','alpha',1):'').'&amp;userid='.$user->id.'&amp;entity='.$conf->entity; $themeparam='?lang='.$langs->defaultlang.'&amp;theme='.$conf->theme.(GETPOST('optioncss')?'&amp;optioncss='.GETPOST('optioncss','alpha',1):'').'&amp;userid='.$user->id.'&amp;entity='.$conf->entity;
$themeparam.=($ext?'&amp;'.$ext:''); $themeparam.=($ext?'&amp;'.$ext:'');