aboutsummaryrefslogtreecommitdiffstats
path: root/view/event_head.tpl
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2012-02-14 16:19:48 +0100
committerFabio Comuni <fabrix.xm@gmail.com>2012-02-14 16:19:48 +0100
commit22cfb77173b1093028c1706f6c513a040ad89967 (patch)
treea47ebd42248204e1bad968eea570e8ffdb50d84f /view/event_head.tpl
parent8369c243b321a421ea2ab92a49d8995b5724244e (diff)
downloadvolse-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/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;
+ });
+ }
});