From 549c920e6f0e1bf6c92dc13d7903173fabbb88ff Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Tue, 14 Feb 2012 16:28:10 +0100 Subject: [PATCH] events js: don't modify rendered item if not autor specified --- view/event_head.tpl | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/view/event_head.tpl b/view/event_head.tpl index 69a901068c..498ac9941c 100755 --- a/view/event_head.tpl +++ b/view/event_head.tpl @@ -22,19 +22,20 @@ }, eventRender: function(event, element, view) { - console.log(view.name); + //console.log(view.name); + if (event.item['author-name']==null) return; switch(view.name){ case "month": - element.find(".fc-event-title").html( - "{1} : {2}".format( + element.find(".fc-event-title").html( + "{1} : {2}".format( event.item['author-avatar'], event.item['author-name'], event.title )); break; case "agendaWeek": - element.find(".fc-event-title").html( - "{1}

{2}

{3}

".format( + element.find(".fc-event-title").html( + "{1}

{2}

{3}

".format( event.item['author-avatar'], event.item['author-name'], event.item.desc, @@ -42,8 +43,8 @@ )); break; case "agendaDay": - element.find(".fc-event-title").html( - "{1}

{2}

{3}

".format( + element.find(".fc-event-title").html( + "{1}

{2}

{3}

".format( event.item['author-avatar'], event.item['author-name'], event.item.desc, -- 2.39.5