From ba0da922785a915231e7a9f1101efdc0cf4345b9 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 31 Oct 2011 10:38:45 +0100 Subject: [PATCH] Fix: reorder javascript libraries inclusion --- htdocs/main.inc.php | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index b20c8c9474a..711da264f83 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -976,32 +976,33 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs print ''."\n"; print ''."\n"; } + // Global js function print ''."\n"; print ''."\n"; + + // Add datepicker default options + print ''."\n"; + + // Output module javascript + if (is_array($arrayofjs)) + { + print ''."\n"; + foreach($arrayofjs as $jsfile) + { + if (preg_match('/^http/i',$jsfile)) + { + print ''."\n"; + } + else + { + if (! preg_match('/^\//',$jsfile)) $jsfile='/'.$jsfile; // For backward compatibility + print ''."\n"; + } + } + } } - // Output module javascript - if (is_array($arrayofjs)) - { - print ''."\n"; - foreach($arrayofjs as $jsfile) - { - if (preg_match('/^http/i',$jsfile)) - { - print ''."\n"; - } - else - { - if (! preg_match('/^\//',$jsfile)) $jsfile='/'.$jsfile; // For backward compatibility - print ''."\n"; - } - } - } - - // Add datepicker default options - print ''."\n"; - if (! empty($head)) print $head."\n"; if (! empty($conf->global->MAIN_HTML_HEADER)) print $conf->global->MAIN_HTML_HEADER."\n";