aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/cdav_calendar.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'view/tpl/cdav_calendar.tpl')
-rw-r--r--view/tpl/cdav_calendar.tpl17
1 files changed, 2 insertions, 15 deletions
diff --git a/view/tpl/cdav_calendar.tpl b/view/tpl/cdav_calendar.tpl
index 2d6853513..edfa2a422 100644
--- a/view/tpl/cdav_calendar.tpl
+++ b/view/tpl/cdav_calendar.tpl
@@ -14,15 +14,12 @@ var contact_deny = [];
var group_deny = [];
var resource = {{$resource}};
-var default_view = resource !== null ? 'timeGridDay' : 'dayGridMonth';
-var default_date = resource !== null ? new Date(resource.dtstart) : new Date();
-
var allday;
$(document).ready(function() {
var calendarEl = document.getElementById('calendar');
calendar = new FullCalendar.Calendar(calendarEl, {
- plugins: [ 'interaction', 'dayGrid', 'timeGrid', 'list' ],
+
eventSources: [ {{$sources}} ],
timeZone: '{{$timezone}}',
@@ -30,15 +27,12 @@ $(document).ready(function() {
locale: '{{$lang}}',
eventTextColor: 'white',
- header: false,
+ headerToolbar: false,
height: 'auto',
firstDay: {{$first_day}},
- defaultView: default_view,
- defaultDate: default_date,
-
weekNumbers: true,
navLinks: true,
@@ -52,10 +46,6 @@ $(document).ready(function() {
changeView('timeGridWeek');
},
- monthNames: aStr['monthNames'],
- monthNamesShort: aStr['monthNamesShort'],
- dayNames: aStr['dayNames'],
- dayNamesShort: aStr['dayNamesShort'],
allDayText: aStr['allday'],
snapDuration: '00:05:00',
@@ -380,11 +370,8 @@ $(document).ready(function() {
$('#event_submit').html('{{$update}}');
}
- if(default_view === 'dayGridMonth');
- $('#id_dtstart_wrapper, #id_dtend_wrapper, #id_timezone_select_wrapper').hide();
});
-
function changeView(viewName) {
calendar.changeView(viewName);