diff --git a/htdocs/core/js/datepicker.js.php b/htdocs/core/js/datepicker.js.php index 634001eaf35..ca85278a1db 100644 --- a/htdocs/core/js/datepicker.js.php +++ b/htdocs/core/js/datepicker.js.php @@ -1,12 +1,24 @@ +/* Copyright (C) 2011 Regis Houssin + * Copyright (C) 2011 Laurent Destailleur * - * Script javascript that contains functions for datepicker default options + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ /** * \file htdocs/core/js/datepicker.js.php - * \brief File that include javascript functions for datepicker default options + * \brief File that include javascript functions for datepickers */ //if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language @@ -23,9 +35,30 @@ if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); session_cache_limiter(FALSE); require_once("../../main.inc.php"); + +// Define tradMonths javascript array (we define this in datepicker AND in parent page to avoid errors with IE8) +$tradMonths=array( +$langs->trans("January"), +$langs->trans("February"), +$langs->trans("March"), +$langs->trans("April"), +$langs->trans("May"), +$langs->trans("June"), +$langs->trans("July"), +$langs->trans("August"), +$langs->trans("September"), +$langs->trans("October"), +$langs->trans("November"), +$langs->trans("December") +); ?> +// For eldy date picker +var tradMonths = ; + + +// For JQuery date picker $(document).ready(function() { $.datepicker.setDefaults({ altField: '#timeStamp', diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 71a489bedb8..3ac7ac0e349 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -998,24 +998,6 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs } } - // Define tradMonths javascript array (we define this in datepicker AND in parent page to avoid errors with IE8) - print ''."\n"; - // Add datepicker default options print ''."\n";