fix event rendering

This commit is contained in:
Mario Vavti 2015-11-26 16:38:14 +01:00
parent 17e7b276f6
commit 8e3b796a2f

View File

@ -64,34 +64,35 @@
}, },
eventRender: function(event, element, view) { eventRender: function(event, element, view) {
//console.log(view.name); //console.log(view.name);
if (event.item['author']['xchan_name']==null) return; if (event.item['author']['xchan_name']==null) return;
switch(view.name){ switch(view.name){
case "month": case "month":
element.find(".fc-event-title").html( element.find(".fc-title").html(
"<img src='{0}' style='height:10px;width:10px'>{1} : {2}".format( "<img src='{0}' style='height:10px;width:10px'>&nbsp;{1}: {2}".format(
event.item['author']['xchan_photo_s'], event.item['author']['xchan_photo_s'],
event.item['author']['xchan_name'], event.item['author']['xchan_name'],
event.title event.title
)); ));
break; break;
case "agendaWeek": case "agendaWeek":
element.find(".fc-event-title").html( element.find(".fc-title").html(
"<img src='{0}' style='height:12px; width:12px'>{1}<p>{2}</p><p>{3}</p>".format( "<img src='{0}' style='height:10px; width:10px'>&nbsp;{1}: {2}<p>{3}</p>".format(
event.item['author']['xchan_photo_s'], event.item['author']['xchan_photo_s'],
event.item['author']['xchan_name'], event.item['author']['xchan_name'],
event.item.desc, event.title,
event.item.location event.item.description
)); ));
break; break;
case "agendaDay": case "agendaDay":
element.find(".fc-event-title").html( element.find(".fc-title").html(
"<img src='{0}' style='height:24px;width:24px'>{1}<p>{2}</p><p>{3}</p>".format( "<img src='{0}' style='height:10px;width:10px'>&nbsp;{1}: {2}<p>{3}</p>".format(
event.item['author']['xchan_photo_s'], event.item['author']['xchan_photo_s'],
event.item['author']['xchan_name'], event.item['author']['xchan_name'],
event.item.desc, event.title,
event.item.location event.item.description
)); ));
break; break;
} }