2018-11-18 15:39:43 +01:00
$ ( "#calendar" ) . fullCalendar ( {
"themeSystem" : "bootstrap4" ,
"header" : {
2018-11-24 20:18:13 +01:00
"left" : "month,basicWeek,listWeek" ,
2018-11-18 15:39:43 +01:00
"center" : "title" ,
"right" : "prev,next"
} ,
"weekNumbers" : true ,
"eventLimit" : true ,
"eventSources" : fullcalendarEventSources
} ) ;
2019-03-04 17:44:48 +01:00
$ ( "#ical-button" ) . on ( "click" , function ( e )
{
e . preventDefault ( ) ;
Grocy . Api . Get ( 'calendar/ical/sharing-link' ,
function ( result )
{
2019-03-05 19:36:14 +01:00
bootbox . alert ( {
title : L ( 'Share/Integrate calendar (iCal)' ) ,
message : L ( 'Use the following (public) URL to share or integrate the calendar in iCal format' ) + '<input type="text" class="form-control form-control-sm mt-2 easy-link-copy-textbox" value="' + result . url + '">'
} ) ;
2019-03-04 17:44:48 +01:00
} ,
function ( xhr )
{
console . error ( xhr ) ;
}
) ;
} ) ;