1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/agendav_ynh.git synced 2024-09-03 20:36:12 +02:00
agendav_ynh/sources/web/application/views/js_code/preferences.php
2014-01-07 17:53:08 +01:00

44 lines
1.2 KiB
JavaScript

var AgenDAVConf = AgenDAVConf || {};
AgenDAVConf = {
prefs_timeformat_option: '<?php
echo addslashes($this->config->item('default_time_format'))?>',
prefs_timeformat: '<?php
echo addslashes($this->dates->time_format_string('fullcalendar'))?>',
prefs_dateformat: '<?php
echo addslashes($this->dates->date_format_string('datepicker'))?>',
prefs_firstday: <?php
echo $this->config->item('default_first_day')?>,
<?php
// Locale dependent format
$prefs = array(
'format_column_month',
'format_column_week',
'format_column_day',
'format_column_table',
'format_title_month',
'format_title_week',
'format_title_day',
'format_title_table',
);
foreach($prefs as $pref) {
echo ' prefs_' . $pref . ": '"
.addslashes($this->config->item($pref)) ."',";
}
?>
timepicker_base: {
show24Hours: <?php echo ($this->config->item('default_time_format') == '24'
? 'true' : 'false')?>,
separator: ':',
step: 30
},
prefs_csrf_cookie_name: '<?php echo
$this->config->item('cookie_prefix') .
$this->config->item('csrf_cookie_name') ?>',
prefs_csrf_token_name: '<?php echo
$this->config->item('csrf_token_name') ?>'
};
<?php
// vim: set ft=javascript