Fix: optimize code
This commit is contained in:
parent
48f4e2d735
commit
338b4375d6
@ -845,7 +845,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
else print "<title>".$appli."</title>";
|
else print "<title>".$appli."</title>";
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
if (! defined('DISABLE_JQUERY'))
|
if (! defined('DISABLE_JQUERY') && ! $disablejs && $conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
print '<!-- Includes for JQuery (Ajax library) -->'."\n";
|
print '<!-- Includes for JQuery (Ajax library) -->'."\n";
|
||||||
$jquerytheme = 'smoothness';
|
$jquerytheme = 'smoothness';
|
||||||
@ -976,10 +976,13 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColVis/js/ColVis.min'.$ext.'"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColVis/js/ColVis.min'.$ext.'"></script>'."\n";
|
||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/TableTools/js/TableTools.min'.$ext.'"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/TableTools/js/TableTools.min'.$ext.'"></script>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Global js function
|
// Global js function
|
||||||
print '<!-- Includes JS of Dolibarr -->'."\n";
|
print '<!-- Includes JS of Dolibarr -->'."\n";
|
||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/lib_head.js"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/lib_head.js"></script>'."\n";
|
||||||
}
|
|
||||||
|
// Add datepicker default options
|
||||||
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/datepicker.js.php?lang='.$langs->defaultlang.'"></script>'."\n";
|
||||||
|
|
||||||
// Output module javascript
|
// Output module javascript
|
||||||
if (is_array($arrayofjs))
|
if (is_array($arrayofjs))
|
||||||
@ -998,9 +1001,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Add datepicker default options
|
|
||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/datepicker.js.php?lang='.$langs->defaultlang.'"></script>'."\n";
|
|
||||||
|
|
||||||
if (! empty($head)) print $head."\n";
|
if (! empty($head)) print $head."\n";
|
||||||
if (! empty($conf->global->MAIN_HTML_HEADER)) print $conf->global->MAIN_HTML_HEADER."\n";
|
if (! empty($conf->global->MAIN_HTML_HEADER)) print $conf->global->MAIN_HTML_HEADER."\n";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user