From: rabuzarus <> Date: Mon, 17 Oct 2016 20:14:12 +0000 (+0200) Subject: frio: stop the custom cal rendering (if no author-name exist) only for the modes... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=430ffb792eb301146e046fa27af975dfac74e2a1;p=friendica.git frio: stop the custom cal rendering (if no author-name exist) only for the modes agendaWeek and agendaDay --- 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; } },