aboutsummaryrefslogtreecommitdiffstats
path: root/view/event_head.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'view/event_head.tpl')
-rwxr-xr-xview/event_head.tpl66
1 files changed, 63 insertions, 3 deletions
diff --git a/view/event_head.tpl b/view/event_head.tpl
index fe0b8fe2a..69a901068 100755
--- a/view/event_head.tpl
+++ b/view/event_head.tpl
@@ -1,3 +1,63 @@
+<link rel='stylesheet' type='text/css' href='$baseurl/library/fullcalendar/fullcalendar.css' />
+<script language="javascript" type="text/javascript"
+ src="$baseurl/library/fullcalendar/fullcalendar.min.js"></script>
+
+<script>
+ $(document).ready(function() {
+ $('#events-calendar').fullCalendar({
+ events: '$baseurl/events/json/',
+ header: {
+ left: 'prev,next today',
+ center: 'title',
+ right: 'month,agendaWeek,agendaDay'
+ },
+ timeFormat: 'H(:mm)',
+ eventClick: function(calEvent, jsEvent, view) {
+ $.get(
+ '$baseurl/events/?id='+calEvent.id,
+ function(data){
+ $.fancybox(data);
+ }
+ );
+ },
+
+ eventRender: function(event, element, view) {
+ console.log(view.name);
+ switch(view.name){
+ case "month":
+ element.find(".fc-event-title").html(
+ "<img src='{0}' style='height:10px'>{1} : {2}".format(
+ event.item['author-avatar'],
+ event.item['author-name'],
+ event.title
+ ));
+ break;
+ case "agendaWeek":
+ element.find(".fc-event-title").html(
+ "<img src='{0}' style='height:12px'>{1}<p>{2}</p><p>{3}</p>".format(
+ event.item['author-avatar'],
+ event.item['author-name'],
+ event.item.desc,
+ event.item.location
+ ));
+ break;
+ case "agendaDay":
+ element.find(".fc-event-title").html(
+ "<img src='{0}' style='height:24px'>{1}<p>{2}</p><p>{3}</p>".format(
+ event.item['author-avatar'],
+ event.item['author-name'],
+ event.item.desc,
+ event.item.location
+ ));
+ break;
+ }
+ }
+
+ })
+ });
+</script>
+
+
<script language="javascript" type="text/javascript"
src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
<script language="javascript" type="text/javascript">
@@ -24,9 +84,9 @@ tinyMCE.init({
theme_advanced_path : false,
setup : function(ed) {
ed.onInit.add(function(ed) {
- ed.pasteAsPlainText = true;
- });
- }
+ ed.pasteAsPlainText = true;
+ });
+ }
});