From 430ffb792eb301146e046fa27af975dfac74e2a1 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Mon, 17 Oct 2016 22:14:12 +0200 Subject: [PATCH] frio: stop the custom cal rendering (if no author-name exist) only for the modes agendaWeek and agendaDay --- view/theme/frio/js/mod_events.js | 53 ++++++++++++++++---------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/view/theme/frio/js/mod_events.js b/view/theme/frio/js/mod_events.js index 0b6bb6e7b2..7b06990fad 100644 --- a/view/theme/frio/js/mod_events.js +++ b/view/theme/frio/js/mod_events.js @@ -38,38 +38,39 @@ $(document).ready(function() { aspectRatio: 1, eventRender: function(event, element, view) { //console.log(view.name); - if (event.item['author-name'] == null) return; switch(view.name){ case "month": - element.find(".fc-title").html( - "{2}".format( - event.item['author-avatar'], - event.item['author-name'], - event.title, - event.item.desc, - event.item.location - )); - break; + element.find(".fc-title").html( + "{2}".format( + event.item['author-avatar'], + event.item['author-name'], + event.title, + event.item.desc, + event.item.location + )); + break; case "agendaWeek": - element.find(".fc-title").html( - "{1}
{2}
{3}
".format( - event.item['author-avatar'], - event.item['author-name'], - event.item.desc, - formatEventLocationText(event.item.location) - )); + if (event.item['author-name'] == null) return; + element.find(".fc-title").html( + "{1}{2}
{3}
".format( + event.item['author-avatar'], + event.item['author-name'], + event.item.desc, + formatEventLocationText(event.item.location) + )); break; case "agendaDay": - element.find(".fc-title").html( - "{1}{2}
{3}
".format( - event.item['author-avatar'], - event.item['author-name'], - event.item.desc, - formatEventLocationText(event.item.location) - )); - break; + if (event.item['author-name'] == null) return; + element.find(".fc-title").html( + "{1}{2}
{3}
".format( + event.item['author-avatar'], + event.item['author-name'], + event.item.desc, + formatEventLocationText(event.item.location) + )); + break; case "listMonth": - element.find(".fc-list-item-title").html(formatListViewEvent(event)); + element.find(".fc-list-item-title").html(formatListViewEvent(event)); break; } },