Fix up calendar .js scripts after namespace change in r11006 CHK-4686.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@11009 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2008-09-24 15:15:16 +00:00
parent 3eb87fa484
commit 4dd3fca557
7 changed files with 9 additions and 12 deletions

View File

@@ -72,7 +72,7 @@ function getEvents(eventdate) {
} }
for (var i=0; i<space.children.length; i++) { for (var i=0; i<space.children.length; i++) {
var child = space.children[i]; var child = space.children[i];
if (child.type=="{com.infoaxon.alfresco.calendar}calendarEvent") { if (child.type=="{http://www.alfresco.org/model/calendar}calendarEvent") {
if (datestr == child.properties["ia:fromDate"].toDateString()) { if (datestr == child.properties["ia:fromDate"].toDateString()) {
var startdate = child.properties["ia:fromDate"]; var startdate = child.properties["ia:fromDate"];
var enddate = child.properties["ia:toDate"]; var enddate = child.properties["ia:toDate"];

View File

@@ -82,7 +82,7 @@ function getDayEvents(requiredDate) {
for (var i=0; i<currentSpace.children.length; i++) for (var i=0; i<currentSpace.children.length; i++)
{ {
var child = currentSpace.children[i]; var child = currentSpace.children[i];
if (child.type=="{com.infoaxon.alfresco.calendar}calendarEvent") if (child.type=="{http://www.alfresco.org/model/calendar}calendarEvent")
{ {
var fromDate = new Date(child.properties["ia:fromDate"]); var fromDate = new Date(child.properties["ia:fromDate"]);
fromDate.setHours(0,0,0,0); fromDate.setHours(0,0,0,0);

View File

@@ -113,7 +113,7 @@ function getDayEvents(requiredDate, requiredTime)
{ {
var child = currentSpace.children[i]; var child = currentSpace.children[i];
var times = requiredTime.split(":"); var times = requiredTime.split(":");
if (child.type=="{com.infoaxon.alfresco.calendar}calendarEvent") { if (child.type=="{http://www.alfresco.org/model/calendar}calendarEvent") {
var fromDate = new Date(child.properties["ia:fromDate"]); var fromDate = new Date(child.properties["ia:fromDate"]);
fromDate.setHours(0,0,0,0); fromDate.setHours(0,0,0,0);
var toDate = new Date(child.properties["ia:toDate"]); var toDate = new Date(child.properties["ia:toDate"]);
@@ -154,7 +154,7 @@ function getAllDayEvents(requiredDate)
for (var i=0; i<currentSpace.children.length; i++) for (var i=0; i<currentSpace.children.length; i++)
{ {
var child = currentSpace.children[i]; var child = currentSpace.children[i];
if (child.type=="{com.infoaxon.alfresco.calendar}calendarEvent") if (child.type=="{http://www.alfresco.org/model/calendar}calendarEvent")
{ {
var fromDate = new Date(child.properties["ia:fromDate"]); var fromDate = new Date(child.properties["ia:fromDate"]);
fromDate.setHours(0,0,0,0); fromDate.setHours(0,0,0,0);

View File

@@ -33,7 +33,7 @@ if (subscriptions == null) {
model.subscriptions = subscriptions; model.subscriptions = subscriptions;
// perform search // perform search
var nodes = search.luceneSearch('TYPE:\"{com.infoaxon.alfresco.calendar}calendar\"'); var nodes = search.luceneSearch('TYPE:\"{http\://www.alfresco.org/model/calendar}calendar\"');
/** /**
var filtered = new Array(); var filtered = new Array();
@@ -50,7 +50,4 @@ var filtered = new Array();
} }
**/ **/
model.available = nodes; model.available = nodes;

View File

@@ -20,7 +20,7 @@ function getEvents(siteId)
} }
var query = "+PATH:\"/app:company_home/st:sites/cm:" + search.ISO9075Encode(site.shortName) + "/cm:calendar/*\" "; var query = "+PATH:\"/app:company_home/st:sites/cm:" + search.ISO9075Encode(site.shortName) + "/cm:calendar/*\" ";
query += "+TYPE:\"{com.infoaxon.alfresco.calendar}calendarEvent\""; query += "+TYPE:\"{http\://www.alfresco.org/model/calendar}calendarEvent\"";
var results = search.luceneSearch(query, "ia:fromDate", true); var results = search.luceneSearch(query, "ia:fromDate", true);
var e, events = []; var e, events = [];

View File

@@ -44,7 +44,7 @@ function getUserEvents(user, range)
if (paths.length > 0) if (paths.length > 0)
{ {
var luceneQuery = "+(" + paths.join(" OR ") + ") +TYPE:\"{com.infoaxon.alfresco.calendar}calendarEvent\""; var luceneQuery = "+(" + paths.join(" OR ") + ") +TYPE:\"{http\://www.alfresco.org/model/calendar}calendarEvent\"";
if (range.fromdate) if (range.fromdate)
{ {
// Expects the date in the format yyyy/mm/dd // Expects the date in the format yyyy/mm/dd

View File

@@ -221,7 +221,7 @@ function getForumPostItem(siteId, containerId, restOfPath, node)
function getCalendarItem(siteId, containerId, restOfPath, node) function getCalendarItem(siteId, containerId, restOfPath, node)
{ {
// only process nodes of the correct type // only process nodes of the correct type
if (node.type != "{com.infoaxon.alfresco.calendar}calendarEvent") if (node.type != "{http://www.alfresco.org/model/calendar}calendarEvent")
{ {
return null; return null;
} }