diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2012-02-14 16:19:48 +0100 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2012-02-14 16:19:48 +0100 |
commit | 22cfb77173b1093028c1706f6c513a040ad89967 (patch) | |
tree | a47ebd42248204e1bad968eea570e8ffdb50d84f /view | |
parent | 8369c243b321a421ea2ab92a49d8995b5724244e (diff) | |
download | volse-hubzilla-22cfb77173b1093028c1706f6c513a040ad89967.tar.gz volse-hubzilla-22cfb77173b1093028c1706f6c513a040ad89967.tar.bz2 volse-hubzilla-22cfb77173b1093028c1706f6c513a040ad89967.zip |
events: first test for full-javascript events calendar
Diffstat (limited to 'view')
-rw-r--r-- | view/event.tpl | 10 | ||||
-rwxr-xr-x | view/event_form.tpl | 4 | ||||
-rwxr-xr-x | view/event_head.tpl | 66 | ||||
-rw-r--r-- | view/events.tpl | 6 |
4 files changed, 81 insertions, 5 deletions
diff --git a/view/event.tpl b/view/event.tpl new file mode 100644 index 000000000..ac9f889ec --- /dev/null +++ b/view/event.tpl @@ -0,0 +1,10 @@ +{{ for $events as $event }} + <div class="event"> + + {{ if $event.item.author-name }}<a href="$event.item.author-link" ><img src="$event.item.author-avatar" height="32" width="32" />$event.item.author-name</a>{{ endif }} + $event.html + {{ if $event.item.plink }}<a href="$event.plink.0" title="$event.plink.1" target="external-link" class="plink-event-link icon s22 remote-link"></a>{{ endif }} + {{ if $event.edit }}<a href="$event.edit.0" title="$event.edit.1" class="edit-event-link icon s22 pencil"></a>{{ endif }} + </div> + <div class="clear"></div> +{{ endfor }} diff --git a/view/event_form.tpl b/view/event_form.tpl index 6de471aca..7d5f8cf4a 100755 --- a/view/event_form.tpl +++ b/view/event_form.tpl @@ -1,7 +1,7 @@ -<h3>$e_text</h3> +<h3>$title</h3> <p> -$e_desc +$desc </p> <form action="$post" method="post" > 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; + }); + } }); diff --git a/view/events.tpl b/view/events.tpl new file mode 100644 index 000000000..b0e182c56 --- /dev/null +++ b/view/events.tpl @@ -0,0 +1,6 @@ +$tabs +<h2>$title</h2> + +<div id="new-event-link"><a href="$new_event.0" >$new_event.1</a></div> + +<div id="events-calendar"></div> |