improve event rendering

This commit is contained in:
Mario Vavti 2015-11-26 20:53:42 +01:00
parent c407e72dcc
commit 8a269823d2

View File

@ -71,30 +71,32 @@
switch(view.name){ switch(view.name){
case "month": case "month":
element.find(".fc-title").html( element.find(".fc-title").html(
"<img src='{0}' style='height:10px;width:10px'>&nbsp;{1}: {2}".format( "<img src='{0}' style='height:12px;width:12px;' title='{1}'>&nbsp;<abbr title='{3}\r\n\r\n{4}'>{2}</abbr>".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,
event.item.description,
event.item.location.replace(/(<([^>]+)>)/ig,"")
)); ));
break; break;
case "agendaWeek": case "agendaWeek":
element.find(".fc-title").html( element.find(".fc-title").html(
"<img src='{0}' style='height:10px; width:10px'>&nbsp;{1}: {2}<p>{3}</p><p>{4}</p>".format( "<img src='{0}' style='height:12px;width:12px;'>&nbsp;{1}: <abbr title='{3}\r\n\r\n{4}'>{2}</abbr>".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,
event.item.description, event.item.description,
event.item.location event.item.location.replace(/(<([^>]+)>)/ig,"")
)); ));
break; break;
case "agendaDay": case "agendaDay":
element.find(".fc-title").html( element.find(".fc-title").html(
"<img src='{0}' style='height:10px;width:10px'>&nbsp;{1}: {2}<p>{3}</p><p>{4}</p>".format( "<img src='{0}' style='height:12px;width:12px;'>&nbsp;{1}: <abbr title='{3}\r\n\r\n{4}'>{2}</abbr>".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,
event.item.description, event.item.description,
event.item.location event.item.location.replace(/(<([^>]+)>)/ig,"")
)); ));
break; break;
} }