]> git.mxchange.org Git - friendica.git/blob - view/event_head.tpl
finish styling category tags and category input
[friendica.git] / view / event_head.tpl
1 <link rel='stylesheet' type='text/css' href='$baseurl/library/fullcalendar/fullcalendar.css' />
2 <script language="javascript" type="text/javascript"
3           src="$baseurl/library/fullcalendar/fullcalendar.min.js"></script>
4
5 <script>
6         $(document).ready(function() {
7             $('#events-calendar').fullCalendar({
8                         events: '$baseurl/events/json/',
9                         header: {
10                                 left: 'prev,next today',
11                                 center: 'title',
12                                 right: 'month,agendaWeek,agendaDay'
13                         },                      
14                         timeFormat: 'H(:mm)',
15                         eventClick: function(calEvent, jsEvent, view) {
16                                 $.get(
17                                         '$baseurl/events/?id='+calEvent.id,
18                                         function(data){
19                                                 $.fancybox(data);
20                                         }
21                                 );
22                         },
23                         
24                         eventRender: function(event, element, view) {
25                                 //console.log(view.name);
26                                 if (event.item['author-name']==null) return;
27                                 switch(view.name){
28                                         case "month":
29                                         element.find(".fc-event-title").html(
30                                                 "<img src='{0}' style='height:10px;width:10px'>{1} : {2}".format(
31                                                         event.item['author-avatar'],
32                                                         event.item['author-name'],
33                                                         event.title
34                                         ));
35                                         break;
36                                         case "agendaWeek":
37                                         element.find(".fc-event-title").html(
38                                                 "<img src='{0}' style='height:12px; width:12px'>{1}<p>{2}</p><p>{3}</p>".format(
39                                                         event.item['author-avatar'],
40                                                         event.item['author-name'],
41                                                         event.item.desc,
42                                                         event.item.location
43                                         ));
44                                         break;
45                                         case "agendaDay":
46                                         element.find(".fc-event-title").html(
47                                                 "<img src='{0}' style='height:24px;width:24px'>{1}<p>{2}</p><p>{3}</p>".format(
48                                                         event.item['author-avatar'],
49                                                         event.item['author-name'],
50                                                         event.item.desc,
51                                                         event.item.location
52                                         ));
53                                         break;
54                                 }
55                         }
56                         
57                 })
58         });
59 </script>
60
61
62 <script language="javascript" type="text/javascript"
63           src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
64           <script language="javascript" type="text/javascript">
65
66
67 tinyMCE.init({
68         theme : "advanced",
69         mode : "textareas",
70         plugins : "bbcode,paste",
71         theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code",
72         theme_advanced_buttons2 : "",
73         theme_advanced_buttons3 : "",
74         theme_advanced_toolbar_location : "top",
75         theme_advanced_toolbar_align : "center",
76         theme_advanced_blockformats : "blockquote,code",
77         gecko_spellcheck : true,
78         paste_text_sticky : true,
79         entity_encoding : "raw",
80         add_unload_trigger : false,
81         remove_linebreaks : false,
82         force_p_newlines : false,
83         force_br_newlines : true,
84         forced_root_block : '',
85         content_css: "$baseurl/view/custom_tinymce.css",
86         theme_advanced_path : false,
87         setup : function(ed) {
88                 ed.onInit.add(function(ed) {
89                         ed.pasteAsPlainText = true;
90                 });
91         }
92
93 });
94
95
96 $(document).ready(function() { 
97
98         $('#event-share-checkbox').change(function() {
99
100                 if ($('#event-share-checkbox').is(':checked')) { 
101                         $('#acl-wrapper').show();
102                 }
103                 else {
104                         $('#acl-wrapper').hide();
105                 }
106         }).trigger('change');
107
108
109         $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
110                 var selstr;
111                 $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
112                         selstr = $(this).text();
113                         $('#jot-public').hide();
114                 });
115                 if(selstr == null) {
116                         $('#jot-public').show();
117                 }
118
119         }).trigger('change');
120
121 });
122
123 </script>
124