dolibarr 19.0.3
timepicker.js.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
3 * Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 */
18
24if (!defined('NOREQUIRESOC')) {
25 define('NOREQUIRESOC', '1');
26}
27if (!defined('NOCSRFCHECK')) {
28 define('NOCSRFCHECK', 1);
29}
30if (!defined('NOTOKENRENEWAL')) {
31 define('NOTOKENRENEWAL', 1);
32}
33if (!defined('NOLOGIN')) {
34 define('NOLOGIN', 1);
35}
36if (!defined('NOREQUIREMENU')) {
37 define('NOREQUIREMENU', 1);
38}
39if (!defined('NOREQUIREHTML')) {
40 define('NOREQUIREHTML', 1);
41}
42if (!defined('NOREQUIREAJAX')) {
43 define('NOREQUIREAJAX', '1');
44}
45
46session_cache_limiter('public');
47
48require_once '../../main.inc.php';
49
50/*
51 * View
52 */
53
54// Define javascript type
55top_httphead('text/javascript; charset=UTF-8');
56// Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access.
57if (empty($dolibarr_nocache)) {
58 header('Cache-Control: max-age=10800, public, must-revalidate');
59} else {
60 header('Cache-Control: no-cache');
61}
62?>
63
64// For JQuery Timepicker
65jQuery(function($){
66 $.timepicker.regional['<?php echo $langs->defaultlang ?>'] = {
67 timeOnlyTitle: '<?php echo $langs->trans("TimeOnly") ?>',
68 timeText: '<?php echo $langs->trans("Time") ?>',
69 hourText: '<?php echo $langs->trans("Hour") ?>',
70 minuteText: '<?php echo $langs->trans("Minute") ?>',
71 secondText: '<?php echo $langs->trans("Second") ?>',
72 millisecText: '<?php echo $langs->trans("Millisecond") ?>',
73 timezoneText: '<?php echo $langs->trans("Timezone") ?>',
74 currentText: '<?php echo $langs->trans("Now") ?>',
75 closeText: '<?php echo $langs->trans("Close2") ?>',
76 timeFormat: 'HH:mm',
77 amNames: ['AM', 'A'],
78 pmNames: ['PM', 'P'],
79 isRTL: <?php echo($langs->trans("DIRECTION") == 'rtl' ? 'true' : 'false'); ?>
80 };
81 $.timepicker.setDefaults($.timepicker.regional['<?php echo $langs->defaultlang ?>']);
82});
83
84<?php
85if (is_object($db)) {
86 $db->close();
87}
if(!defined( 'NOREQUIREMENU')) if(!empty(GETPOST('seteventmessages', 'alpha'))) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.