mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Modified event info panel to display tag information. Fixed event creation bugs with regard to all day events and an empty tag field. Added i18n properties to info panel.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@9853 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -72,6 +72,7 @@ function main()
|
||||
"location": event.properties["ia:whereEvent"],
|
||||
"from": event.properties["ia:fromDate"],
|
||||
"to": event.properties["ia:toDate"],
|
||||
"tags": event.tags
|
||||
};
|
||||
|
||||
// Figure out if this an all day event
|
||||
@@ -97,6 +98,8 @@ function isAllDayEvent(event)
|
||||
|
||||
var startTime = startDate.getHours() + ":" + startDate.getMinutes();
|
||||
var endTime = endDate.getHours() + ":" + endDate.getMinutes();
|
||||
|
||||
logger.log("STARTTIME: " + startTime + " " + endTime + " " + (startTime == "0:0" && (startTime == endTime)));
|
||||
|
||||
return (startTime === "0:0" && (startTime === endTime));
|
||||
return (startTime == "0:0" && (startTime == endTime));
|
||||
}
|
||||
|
@@ -6,6 +6,11 @@
|
||||
what: "${result.what}",
|
||||
description: "${result.description}",
|
||||
location: "${result.location}",
|
||||
tags: [
|
||||
<#list result.tags as tag>
|
||||
"${tag}"<#if tag_has_next>,</#if>
|
||||
</#list>
|
||||
],
|
||||
from: "${result.from?string("M/d/yyyy")}",
|
||||
start: "${result.from?string("HH:mm")}",
|
||||
to: "${result.to?string("M/d/yyyy")}",
|
||||
|
@@ -80,17 +80,20 @@ function createEvent(siteId, params)
|
||||
var toDate = params["to"];
|
||||
|
||||
var allday = params["allday"];
|
||||
if (!allday)
|
||||
if (allday === undefined)
|
||||
{
|
||||
fromDate += " " + params["start"];
|
||||
toDate += " " + params["end"];
|
||||
}
|
||||
|
||||
var tags = params["tags"]; // space delimited string
|
||||
if (tags)
|
||||
var tags = String(params["tags"]); // space delimited string
|
||||
if (tags !== "")
|
||||
{
|
||||
var tagsArray = tags.split(" ");
|
||||
event.tags = tagsArray;
|
||||
if (tagsArray.length > 0)
|
||||
{
|
||||
event.tags = tagsArray;
|
||||
}
|
||||
}
|
||||
|
||||
var from = new Date(fromDate);
|
||||
|
Reference in New Issue
Block a user