This commit is contained in:
friendica 2013-03-21 18:29:08 -07:00
commit 0999b88a48
3 changed files with 17 additions and 15 deletions

View File

@ -169,6 +169,8 @@ function event_store($arr) {
return $r[0]['id'];
}
$event_hash = $r[0]['event_hash'];
// The event changed. Update it.
$r = q("UPDATE `event` SET
@ -205,7 +207,7 @@ function event_store($arr) {
);
$r = q("SELECT * FROM item left join xchan on author_xchan = xchan_hash WHERE resource_id = '%s' AND resource_type = 'event' and uid = %d LIMIT 1",
intval($r[0]['event_hash']),
dbesc($event_hash),
intval($arr['uid'])
);

View File

@ -27,21 +27,21 @@
eventRender: function(event, element, view) {
//console.log(view.name);
if (event.item['author-name']==null) return;
if (event.item['author']['xchan_name']==null) return;
switch(view.name){
case "month":
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.item['author']['xchan_photo_s'],
event.item['author']['xchan_name'],
event.title
));
break;
case "agendaWeek":
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['author']['xchan_photo_s'],
event.item['author']['xchan_name'],
event.item.desc,
event.item.location
));
@ -49,8 +49,8 @@
case "agendaDay":
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['author']['xchan_photo_s'],
event.item['author']['xchan_name'],
event.item.desc,
event.item.location
));

View File

@ -32,21 +32,21 @@
eventRender: function(event, element, view) {
//console.log(view.name);
if (event.item['author-name']==null) return;
if (event.item['author']['xchan_name']==null) return;
switch(view.name){
case "month":
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.item['author']['xchan_photo_s'],
event.item['author']['xchan_name'],
event.title
));
break;
case "agendaWeek":
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['author']['xchan_photo_s'],
event.item['author']['xchan_name'],
event.item.desc,
event.item.location
));
@ -54,8 +54,8 @@
case "agendaDay":
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['author']['xchan_photo_s'],
event.item['author']['xchan_name'],
event.item.desc,
event.item.location
));