1 <link rel="stylesheet" type="text/css" href="{{$baseurl}}/view/asset/fullcalendar/dist/fullcalendar.min.css?v={{$smarty.const.FRIENDICA_VERSION}}" />
2 <link rel="stylesheet" type="text/css" href="{{$baseurl}}/view/asset/fullcalendar/dist/fullcalendar.print.min.css?v={{$smarty.const.FRIENDICA_VERSION}}" media="print" />
3 <script type="text/javascript" src="{{$baseurl}}/view/asset/moment/min/moment-with-locales.min.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
4 <script type="text/javascript" src="{{$baseurl}}/view/asset/fullcalendar/dist/fullcalendar.min.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
7 function showEvent(eventid) {
9 '{{$event_api}}/' + eventid,
11 $.colorbox({html:data});
16 function doEventPreview() {
17 $('#event-edit-preview').val(1);
18 $.post('events', $('#event-edit-form').serialize(), function(data) {
19 $.colorbox({ html: data });
21 $('#event-edit-preview').val(0);
24 // disable the input for the finish date if it is not available
25 function enableDisableFinishDate() {
26 if( $('#id_nofinish').is(':checked'))
27 $('#id_finish_text').prop("disabled", true);
29 $('#id_finish_text').prop("disabled", false);
32 $(document).ready(function() {
33 $('#events-calendar').fullCalendar({
34 defaultView: '{{$i18n.defaultView|escape:'quotes'}}',
35 firstDay: '{{$i18n.firstDay|escape:'quotes'}}',
37 '{{$i18n.January|escape:'quotes'}}',
38 '{{$i18n.February|escape:'quotes'}}',
39 '{{$i18n.March|escape:'quotes'}}',
40 '{{$i18n.April|escape:'quotes'}}',
41 '{{$i18n.May|escape:'quotes'}}',
42 '{{$i18n.June|escape:'quotes'}}',
43 '{{$i18n.July|escape:'quotes'}}',
44 '{{$i18n.August|escape:'quotes'}}',
45 '{{$i18n.September|escape:'quotes'}}',
46 '{{$i18n.October|escape:'quotes'}}',
47 '{{$i18n.November|escape:'quotes'}}',
48 '{{$i18n.December|escape:'quotes'}}'
51 '{{$i18n.Jan|escape:'quotes'}}',
52 '{{$i18n.Feb|escape:'quotes'}}',
53 '{{$i18n.Mar|escape:'quotes'}}',
54 '{{$i18n.Apr|escape:'quotes'}}',
55 '{{$i18n.May|escape:'quotes'}}',
56 '{{$i18n.Jun|escape:'quotes'}}',
57 '{{$i18n.Jul|escape:'quotes'}}',
58 '{{$i18n.Aug|escape:'quotes'}}',
59 '{{$i18n.Sep|escape:'quotes'}}',
60 '{{$i18n.Oct|escape:'quotes'}}',
61 '{{$i18n.Nov|escape:'quotes'}}',
62 '{{$i18n.Dec|escape:'quotes'}}'
65 '{{$i18n.Sunday|escape:'quotes'}}',
66 '{{$i18n.Monday|escape:'quotes'}}',
67 '{{$i18n.Tuesday|escape:'quotes'}}',
68 '{{$i18n.Wednesday|escape:'quotes'}}',
69 '{{$i18n.Thursday|escape:'quotes'}}',
70 '{{$i18n.Friday|escape:'quotes'}}',
71 '{{$i18n.Saturday|escape:'quotes'}}'
74 '{{$i18n.Sun|escape:'quotes'}}',
75 '{{$i18n.Mon|escape:'quotes'}}',
76 '{{$i18n.Tue|escape:'quotes'}}',
77 '{{$i18n.Wed|escape:'quotes'}}',
78 '{{$i18n.Thu|escape:'quotes'}}',
79 '{{$i18n.Fri|escape:'quotes'}}',
80 '{{$i18n.Sat|escape:'quotes'}}'
82 allDayText: '{{$i18n.allday|escape:'quotes'}}',
83 noEventsMessage: '{{$i18n.noevent|escape:'quotes'}}',
85 today: '{{$i18n.today|escape:'quotes'}}',
86 month: '{{$i18n.month|escape:'quotes'}}',
87 week: '{{$i18n.week|escape:'quotes'}}',
88 day: '{{$i18n.day|escape:'quotes'}}'
90 events: '{{$calendar_api}}',
92 left: 'prev,next today',
94 right: 'month,agendaWeek,agendaDay'
97 eventClick: function(calEvent) {
98 showEvent(calEvent.id);
100 loading: function(isLoading) {
102 $('td.fc-day').dblclick(function() { window.location.href='/calendar/event/new?start=' + $(this).data('date'); });
106 eventRender: function(event, element, view) {
107 if (event.item['author-name']==null) return;
110 element.find(".fc-title").html(
116 element.find(".fc-title").html(
117 "{0}<p>{1}</p><p>{2}</p>".format(
118 event.item['author-name'],
124 element.find(".fc-title").html(
125 "{0}<p>{1}</p><p>{2}</p>".format(
126 event.item['author-name'],
137 let hash = location.hash.split("-");
138 if (hash.length === 2 && hash[0] === "#link") showEvent(hash[1]);
142 <script language="javascript" type="text/javascript">
143 $(document).ready(function() {
144 $("#comment-edit-text-desc").bbco_autocomplete('bbcode');
146 $('#id_share').change(function() {
148 if ($('#id_share').is(':checked')) {
149 $('#acl-wrapper').show();
152 $('#acl-wrapper').hide();
154 }).trigger('change');
156 $('#contact_allow, #contact_deny, #circle_allow, #circle_deny').change(function() {
158 $('#contact_allow option:selected, #contact_deny option:selected, #circle_allow option:selected, #circle_deny option:selected').each( function() {
159 selstr = $(this).html();
160 $('#jot-public').hide();
163 $('#jot-public').show();
165 }).trigger('change');
167 // disable the finish time input if the user disable it
168 $('#id_nofinish').change(function() {
169 enableDisableFinishDate()
170 }).trigger('change');