]> git.mxchange.org Git - friendica.git/commitdiff
events js: don't modify rendered item if not autor specified
authorFabio Comuni <fabrix.xm@gmail.com>
Tue, 14 Feb 2012 15:28:10 +0000 (16:28 +0100)
committerFabio Comuni <fabrix.xm@gmail.com>
Tue, 14 Feb 2012 15:28:10 +0000 (16:28 +0100)
view/event_head.tpl

index 69a901068c158ec175674582000741e68481aa56..498ac9941c650ed9bdcd6114703c807f7072e634 100755 (executable)
                        },
                        
                        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(
-                                               "<img src='{0}' style='height:10px'>{1} : {2}".format(
+                                       element.find(".fc-event-title").html(
+                                               "<img src='{0}' style='height:10px;width:10px'>{1} : {2}".format(
                                                        event.item['author-avatar'],
                                                        event.item['author-name'],
                                                        event.title
                                        ));
                                        break;
                                        case "agendaWeek":
-                                        element.find(".fc-event-title").html(
-                                               "<img src='{0}' style='height:12px'>{1}<p>{2}</p><p>{3}</p>".format(
+                                       element.find(".fc-event-title").html(
+                                               "<img src='{0}' style='height:12px; width:12px'>{1}<p>{2}</p><p>{3}</p>".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(
-                                               "<img src='{0}' style='height:24px'>{1}<p>{2}</p><p>{3}</p>".format(
+                                       element.find(".fc-event-title").html(
+                                               "<img src='{0}' style='height:24px;width:24px'>{1}<p>{2}</p><p>{3}</p>".format(
                                                        event.item['author-avatar'],
                                                        event.item['author-name'],
                                                        event.item.desc,