mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +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"],
|
"location": event.properties["ia:whereEvent"],
|
||||||
"from": event.properties["ia:fromDate"],
|
"from": event.properties["ia:fromDate"],
|
||||||
"to": event.properties["ia:toDate"],
|
"to": event.properties["ia:toDate"],
|
||||||
|
"tags": event.tags
|
||||||
};
|
};
|
||||||
|
|
||||||
// Figure out if this an all day event
|
// Figure out if this an all day event
|
||||||
@@ -98,5 +99,7 @@ function isAllDayEvent(event)
|
|||||||
var startTime = startDate.getHours() + ":" + startDate.getMinutes();
|
var startTime = startDate.getHours() + ":" + startDate.getMinutes();
|
||||||
var endTime = endDate.getHours() + ":" + endDate.getMinutes();
|
var endTime = endDate.getHours() + ":" + endDate.getMinutes();
|
||||||
|
|
||||||
return (startTime === "0:0" && (startTime === endTime));
|
logger.log("STARTTIME: " + startTime + " " + endTime + " " + (startTime == "0:0" && (startTime == endTime)));
|
||||||
|
|
||||||
|
return (startTime == "0:0" && (startTime == endTime));
|
||||||
}
|
}
|
||||||
|
@@ -6,6 +6,11 @@
|
|||||||
what: "${result.what}",
|
what: "${result.what}",
|
||||||
description: "${result.description}",
|
description: "${result.description}",
|
||||||
location: "${result.location}",
|
location: "${result.location}",
|
||||||
|
tags: [
|
||||||
|
<#list result.tags as tag>
|
||||||
|
"${tag}"<#if tag_has_next>,</#if>
|
||||||
|
</#list>
|
||||||
|
],
|
||||||
from: "${result.from?string("M/d/yyyy")}",
|
from: "${result.from?string("M/d/yyyy")}",
|
||||||
start: "${result.from?string("HH:mm")}",
|
start: "${result.from?string("HH:mm")}",
|
||||||
to: "${result.to?string("M/d/yyyy")}",
|
to: "${result.to?string("M/d/yyyy")}",
|
||||||
|
@@ -80,17 +80,20 @@ function createEvent(siteId, params)
|
|||||||
var toDate = params["to"];
|
var toDate = params["to"];
|
||||||
|
|
||||||
var allday = params["allday"];
|
var allday = params["allday"];
|
||||||
if (!allday)
|
if (allday === undefined)
|
||||||
{
|
{
|
||||||
fromDate += " " + params["start"];
|
fromDate += " " + params["start"];
|
||||||
toDate += " " + params["end"];
|
toDate += " " + params["end"];
|
||||||
}
|
}
|
||||||
|
|
||||||
var tags = params["tags"]; // space delimited string
|
var tags = String(params["tags"]); // space delimited string
|
||||||
if (tags)
|
if (tags !== "")
|
||||||
{
|
{
|
||||||
var tagsArray = tags.split(" ");
|
var tagsArray = tags.split(" ");
|
||||||
event.tags = tagsArray;
|
if (tagsArray.length > 0)
|
||||||
|
{
|
||||||
|
event.tags = tagsArray;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var from = new Date(fromDate);
|
var from = new Date(fromDate);
|
||||||
|
Reference in New Issue
Block a user