forked from Wavyzz/dolibarr
Minor speed enhancement
This commit is contained in:
@@ -26,7 +26,7 @@
|
|||||||
* \file htdocs/main.inc.php
|
* \file htdocs/main.inc.php
|
||||||
* \ingroup core
|
* \ingroup core
|
||||||
* \brief File that defines environment for Dolibarr pages only (variables not required by scripts)
|
* \brief File that defines environment for Dolibarr pages only (variables not required by scripts)
|
||||||
* \version $Id: main.inc.php,v 1.750 2011/07/06 11:43:39 eldy Exp $
|
* \version $Id: main.inc.php,v 1.751 2011/07/06 12:09:19 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ini_set('memory_limit', '64M'); // This may be useless if memory is hard limited by your PHP
|
@ini_set('memory_limit', '64M'); // This may be useless if memory is hard limited by your PHP
|
||||||
@@ -904,12 +904,11 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
print '<!-- Includes for JQuery (Ajax library) -->'."\n";
|
print '<!-- Includes for JQuery (Ajax library) -->'."\n";
|
||||||
$jquerytheme = 'smoothness';
|
$jquerytheme = 'smoothness';
|
||||||
if (!empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME;
|
if (!empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME;
|
||||||
print '<link rel="stylesheet" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css" type="text/css" />'."\n"; // JQuery
|
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css" />'."\n"; // JQuery
|
||||||
print '<link rel="stylesheet" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/tiptip/tipTip.css" type="text/css" />'."\n"; // Tooltip
|
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/tiptip/tipTip.css" />'."\n"; // Tooltip
|
||||||
print '<link rel="stylesheet" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/jnotify/jquery.jnotify-alt.min.css" type="text/css" />'."\n"; // JNotify
|
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/jnotify/jquery.jnotify-alt.min.css" />'."\n"; // JNotify
|
||||||
//print '<link rel="stylesheet" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/lightbox/css/jquery.lightbox-0.5.css" media="screen" />'."\n"; // Lightbox
|
//print '<link rel="stylesheet" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/lightbox/css/jquery.lightbox-0.5.css" media="screen" />'."\n"; // Lightbox
|
||||||
// jQuery fileupload
|
if (! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD)) // jQuery fileupload
|
||||||
if (! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD))
|
|
||||||
{
|
{
|
||||||
print '<link rel="stylesheet" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/fileupload/jquery.fileupload-ui.css" type="text/css" />'."\n";
|
print '<link rel="stylesheet" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/fileupload/jquery.fileupload-ui.css" type="text/css" />'."\n";
|
||||||
}
|
}
|
||||||
@@ -1014,6 +1013,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Define tradMonths javascript array (we define this in datapicker AND in parent page to avoid errors with IE8)
|
// Define tradMonths javascript array (we define this in datapicker AND in parent page to avoid errors with IE8)
|
||||||
|
print '<script type="text/javascript">'."\n";
|
||||||
$tradMonths=array($langs->trans("January"),
|
$tradMonths=array($langs->trans("January"),
|
||||||
$langs->trans("February"),
|
$langs->trans("February"),
|
||||||
$langs->trans("March"),
|
$langs->trans("March"),
|
||||||
@@ -1027,9 +1027,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
$langs->trans("November"),
|
$langs->trans("November"),
|
||||||
$langs->trans("December")
|
$langs->trans("December")
|
||||||
);
|
);
|
||||||
print '<script type="text/javascript">';
|
print 'var tradMonths = '.json_encode($tradMonths).';'."\n";
|
||||||
print 'var tradMonths = '.json_encode($tradMonths).';';
|
|
||||||
print '</script>'."\n";
|
|
||||||
|
|
||||||
// Define tradMonthsMin javascript array (we define this in datapicker AND in parent page to avoid errors with IE8)
|
// Define tradMonthsMin javascript array (we define this in datapicker AND in parent page to avoid errors with IE8)
|
||||||
$tradMonthsMin=array($langs->trans("JanuaryMin"),
|
$tradMonthsMin=array($langs->trans("JanuaryMin"),
|
||||||
@@ -1045,9 +1043,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
$langs->trans("NovemberMin"),
|
$langs->trans("NovemberMin"),
|
||||||
$langs->trans("DecemberMin")
|
$langs->trans("DecemberMin")
|
||||||
);
|
);
|
||||||
print '<script type="text/javascript">';
|
print 'var tradMonthsMin = '.json_encode($tradMonthsMin).';'."\n";
|
||||||
print 'var tradMonthsMin = '.json_encode($tradMonthsMin).';';
|
|
||||||
print '</script>'."\n";
|
|
||||||
|
|
||||||
// Define tradDays javascript array (we define this in datapicker AND in parent page to avoid errors with IE8)
|
// Define tradDays javascript array (we define this in datapicker AND in parent page to avoid errors with IE8)
|
||||||
$tradDays=array($langs->trans("Monday"),
|
$tradDays=array($langs->trans("Monday"),
|
||||||
@@ -1058,9 +1054,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
$langs->trans("Saturday"),
|
$langs->trans("Saturday"),
|
||||||
$langs->trans("Sunday")
|
$langs->trans("Sunday")
|
||||||
);
|
);
|
||||||
print '<script type="text/javascript">';
|
print 'var tradDays = '.json_encode($tradDays).';'."\n";
|
||||||
print 'var tradDays = '.json_encode($tradDays).';';
|
|
||||||
print '</script>'."\n";
|
|
||||||
|
|
||||||
// Define tradDaysMin javascript array (we define this in datapicker AND in parent page to avoid errors with IE8)
|
// Define tradDaysMin javascript array (we define this in datapicker AND in parent page to avoid errors with IE8)
|
||||||
$tradDaysMin=array($langs->trans("MondayMin"),
|
$tradDaysMin=array($langs->trans("MondayMin"),
|
||||||
@@ -1071,8 +1065,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
$langs->trans("SaturdayMin"),
|
$langs->trans("SaturdayMin"),
|
||||||
$langs->trans("SundayMin")
|
$langs->trans("SundayMin")
|
||||||
);
|
);
|
||||||
print '<script type="text/javascript">';
|
print 'var tradDaysMin = '.json_encode($tradDaysMin).';'."\n";
|
||||||
print 'var tradDaysMin = '.json_encode($tradDaysMin).';';
|
|
||||||
print '</script>'."\n";
|
print '</script>'."\n";
|
||||||
|
|
||||||
if (! empty($head)) print $head."\n";
|
if (! empty($head)) print $head."\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user