Added activity feed templates for event edit. Fixed date display problem. All edited details are now updated.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@9512 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Simon Buckle
2008-06-19 10:04:05 +00:00
parent af0f04335d
commit 39630505e4
3 changed files with 77 additions and 39 deletions

View File

@@ -0,0 +1,12 @@
<entry xmlns='http://www.w3.org/2005/Atom'>
<title>Event deleted: ${eventName!""}</title>
<icon></icon>
<id>${id}</id>
<updated>${xmldate(date)}</updated>
<summary>
${firstName!"anon"} ${lastName!""} just updated the event ${eventName}.</summary>
<author>
<name>${userId!""}</name>
</author>
</entry>

View File

@@ -0,0 +1,7 @@
<item>
<title>Event deleted: ${eventName!""}</title>
<link></link>
<guid>${id}</guid>
<description>${firstName!"anon"} ${lastName!""} just updated the event ${eventName}.</description>
</item>

View File

@@ -70,7 +70,6 @@ function main()
try
{
var value = json.get(prop);
// TODO: deal with formatting date strings correctly
if (value)
{
event.properties[ propsmap[prop] ] = value;
@@ -82,6 +81,26 @@ function main()
}
}
try
{
// Handle date formatting as a separate case
var from = new Date(json.get("from") + " " + json.get("start"));
event.properties["ia:fromDate"] = from;
var to = new Date(json.get("to") + " " + json.get("end"));
event.properties["ia:toDate"] = to;
var eventName = json.get("what");
activities.postActivity("org.alfresco.calendar.event-updated", params.siteid, "calendar", '{ "eventName" : ' + eventName + ' }');
}
catch(e)
{
if (logger.isLoggingEnabled())
{
logger.log(e);
}
}
event.save();
return status.STATUS_NO_CONTENT;
}