2 <link rel='stylesheet' type='text/css' href='{{$baseurl}}/library/fullcalendar/fullcalendar.css' />
3 <script language="javascript" type="text/javascript"
4 src="{{$baseurl}}/library/fullcalendar/fullcalendar.min.js"></script>
7 function showEvent(eventid) {
9 '{{$baseurl}}/events/?id='+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);
25 $(document).ready(function() {
26 $('#events-calendar').fullCalendar({
27 events: '{{$baseurl}}/events/json/',
29 left: 'prev,next today',
31 right: 'month,agendaWeek,agendaDay'
34 eventClick: function(calEvent, jsEvent, view) {
35 showEvent(calEvent.id);
37 loading: function(isLoading, view) {
39 $('td.fc-day').dblclick(function() { window.location.href='/events/new?start='+$(this).data('date'); });
43 eventRender: function(event, element, view) {
44 //console.log(view.name);
45 if (event.item['author-name']==null) return;
48 element.find(".fc-event-title").html(
49 "<img src='{0}' style='height:10px;width:10px'>{1} : {2}".format(
50 event.item['author-avatar'],
51 event.item['author-name'],
56 element.find(".fc-event-title").html(
57 "<img src='{0}' style='height:12px; width:12px'>{1}<p>{2}</p><p>{3}</p>".format(
58 event.item['author-avatar'],
59 event.item['author-name'],
65 element.find(".fc-event-title").html(
66 "<img src='{0}' style='height:24px;width:24px'>{1}<p>{2}</p><p>{3}</p>".format(
67 event.item['author-avatar'],
68 event.item['author-name'],
79 var args=location.href.replace(baseurl,"").split("/");
81 $("#events-calendar").fullCalendar('gotoDate',args[2] , args[3]-1);
85 var hash = location.hash.split("-")
86 if (hash.length==2 && hash[0]=="#link") showEvent(hash[1]);
92 {{if $editselect != 'none'}}
93 <script language="javascript" type="text/javascript"
94 src="{{$baseurl}}/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
95 <script language="javascript" type="text/javascript">
101 plugins : "bbcode,paste",
102 theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code",
103 theme_advanced_buttons2 : "",
104 theme_advanced_buttons3 : "",
105 theme_advanced_toolbar_location : "top",
106 theme_advanced_toolbar_align : "center",
107 theme_advanced_blockformats : "blockquote,code",
108 theme_advanced_resizing : true,
109 gecko_spellcheck : true,
110 paste_text_sticky : true,
111 entity_encoding : "raw",
112 add_unload_trigger : false,
113 remove_linebreaks : false,
114 //force_p_newlines : false,
115 //force_br_newlines : true,
116 forced_root_block : 'div',
117 content_css: "{{$baseurl}}/view/custom_tinymce.css",
118 theme_advanced_path : false,
119 setup : function(ed) {
120 ed.onInit.add(function(ed) {
121 ed.pasteAsPlainText = true;
127 <script language="javascript" type="text/javascript">
131 $(document).ready(function() {
133 $('#event-share-checkbox').change(function() {
135 if ($('#event-share-checkbox').is(':checked')) {
136 $('#acl-wrapper').show();
139 $('#acl-wrapper').hide();
141 }).trigger('change');
144 $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
146 $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
147 selstr = $(this).text();
148 $('#jot-public').hide();
151 $('#jot-public').show();
154 }).trigger('change');