fix timeformat setting for fullcalendar
This commit is contained in:
parent
6c4692380f
commit
a38778f911
|
@ -138,9 +138,9 @@ Calendar={
|
|||
},
|
||||
getEventPopupText:function(event){
|
||||
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{
|
||||
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
|
||||
}
|
||||
var html =
|
||||
|
@ -482,13 +482,13 @@ $(document).ready(function(){
|
|||
editable: true,
|
||||
defaultView: defaultView,
|
||||
timeFormat: {
|
||||
agenda: 'HH:mm{ - HH:mm}',
|
||||
'': 'HH:mm'
|
||||
agenda: agendatime,
|
||||
'': defaulttime
|
||||
},
|
||||
titleFormat: {
|
||||
list: 'yyyy/MMM/d dddd'
|
||||
},
|
||||
axisFormat: 'HH:mm',
|
||||
axisFormat: defaulttime,
|
||||
monthNames: monthNames,
|
||||
monthNamesShort: monthNamesShort,
|
||||
dayNames: dayNames,
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
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 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 missing_field = '<?php echo $l->t('Missing fields') ?>';
|
||||
var missing_field_title = '<?php echo $l->t('Title') ?>';
|
||||
|
|
Loading…
Reference in New Issue