mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
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:
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user