fix timeformat setting for fullcalendar
This commit is contained in:
parent
6c4692380f
commit
a38778f911
2 changed files with 7 additions and 5 deletions
|
@ -138,9 +138,9 @@ Calendar={
|
||||||
},
|
},
|
||||||
getEventPopupText:function(event){
|
getEventPopupText:function(event){
|
||||||
if (event.allDay){
|
if (event.allDay){
|
||||||
var timespan = $.fullCalendar.formatDates(event.start, event.end, t('calendar', "ddd d MMMM[ yyyy]{ -[ddd d] MMMM yyyy}"));
|
var timespan = $.fullCalendar.formatDates(event.start, event.end, 'ddd d MMMM[ yyyy]{ -[ddd d] MMMM yyyy}', {monthNamesShort: monthNamesShort, monthNames: monthNames, dayNames: dayNames, dayNamesShort: dayNamesShort}); //t('calendar', "ddd d MMMM[ yyyy]{ -[ddd d] MMMM yyyy}")
|
||||||
}else{
|
}else{
|
||||||
var timespan = $.fullCalendar.formatDates(event.start, event.end, t('calendar', "ddd d MMMM[ yyyy] HH:mm{ -[ ddd d MMMM yyyy] HH:mm}"));
|
var timespan = $.fullCalendar.formatDates(event.start, event.end, 'ddd d MMMM[ yyyy] ' + defaulttime + '{ -[ ddd d MMMM yyyy]' + defaulttime + '}', {monthNamesShort: monthNamesShort, monthNames: monthNames, dayNames: dayNames, dayNamesShort: dayNamesShort}); //t('calendar', "ddd d MMMM[ yyyy] HH:mm{ -[ ddd d MMMM yyyy] HH:mm}")
|
||||||
// Tue 18 October 2011 08:00 - 16:00
|
// Tue 18 October 2011 08:00 - 16:00
|
||||||
}
|
}
|
||||||
var html =
|
var html =
|
||||||
|
@ -482,13 +482,13 @@ $(document).ready(function(){
|
||||||
editable: true,
|
editable: true,
|
||||||
defaultView: defaultView,
|
defaultView: defaultView,
|
||||||
timeFormat: {
|
timeFormat: {
|
||||||
agenda: 'HH:mm{ - HH:mm}',
|
agenda: agendatime,
|
||||||
'': 'HH:mm'
|
'': defaulttime
|
||||||
},
|
},
|
||||||
titleFormat: {
|
titleFormat: {
|
||||||
list: 'yyyy/MMM/d dddd'
|
list: 'yyyy/MMM/d dddd'
|
||||||
},
|
},
|
||||||
axisFormat: 'HH:mm',
|
axisFormat: defaulttime,
|
||||||
monthNames: monthNames,
|
monthNames: monthNames,
|
||||||
monthNamesShort: monthNamesShort,
|
monthNamesShort: monthNamesShort,
|
||||||
dayNames: dayNames,
|
dayNames: dayNames,
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
var dayNamesShort = <?php echo json_encode($l->tA(array('Sun.', 'Mon.', 'Tue.', 'Wed.', 'Thu.', 'Fri.', 'Sat.'))) ?>;
|
var dayNamesShort = <?php echo json_encode($l->tA(array('Sun.', 'Mon.', 'Tue.', 'Wed.', 'Thu.', 'Fri.', 'Sat.'))) ?>;
|
||||||
var monthNames = <?php echo json_encode($l->tA(array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'))) ?>;
|
var monthNames = <?php echo json_encode($l->tA(array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'))) ?>;
|
||||||
var monthNamesShort = <?php echo json_encode($l->tA(array('Jan.', 'Feb.', 'Mar.', 'Apr.', 'May.', 'Jun.', 'Jul.', 'Aug.', 'Sep.', 'Oct.', 'Nov.', 'Dec.'))) ?>;
|
var monthNamesShort = <?php echo json_encode($l->tA(array('Jan.', 'Feb.', 'Mar.', 'Apr.', 'May.', 'Jun.', 'Jul.', 'Aug.', 'Sep.', 'Oct.', 'Nov.', 'Dec.'))) ?>;
|
||||||
|
var agendatime = '<?php echo ((int) OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timeformat', '24') == 24 ? 'HH:mm' : 'hh:mm tt'); ?>{ - <?php echo ((int) OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timeformat', '24') == 24 ? 'HH:mm' : 'hh:mm tt'); ?>}';
|
||||||
|
var defaulttime = '<?php echo ((int) OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timeformat', '24') == 24 ? 'HH:mm' : 'hh:mm tt'); ?>';
|
||||||
var allDayText = '<?php echo $l->t('All day') ?>';
|
var allDayText = '<?php echo $l->t('All day') ?>';
|
||||||
var missing_field = '<?php echo $l->t('Missing fields') ?>';
|
var missing_field = '<?php echo $l->t('Missing fields') ?>';
|
||||||
var missing_field_title = '<?php echo $l->t('Title') ?>';
|
var missing_field_title = '<?php echo $l->t('Title') ?>';
|
||||||
|
|
Loading…
Reference in a new issue