From 2b9eee9b6c9e14eaa00e1021f7b0f60e8e276db2 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 17 Oct 2006 15:50:43 +0000 Subject: [PATCH] ChangeLog Monotone-Parent: cdf45df950d2d276ce70c14e9cd0e7024d76c371 Monotone-Revision: 3a4ad086b44cb19e39fec3273f04fd22146bf748 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-10-17T15:50:43 Monotone-Branch: ca.inverse.sogo --- UI/WebServerResources/SchedulerUI.js | 30 +++++++++++++++------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index e8e7fdc59..6d452779b 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -707,26 +707,26 @@ function updateTaskStatus(node) return false; } -function updateCalendarStatus(node) +function updateCalendarStatus() { var list = new Array(); + log ("update..."); var clist = $("calendarsList"); - var nodes = clist.childNodes[5].childNodes; + var nodes = clist.childNodesWithTag("ul")[0].childNodesWithTag("li"); for (var i = 0; i < nodes.length; i++) { - var currentNode = nodes[i]; - if (currentNode instanceof HTMLLIElement) { - var input = currentNode.childNodes[3]; - if (input.checked) - list[list.length] = currentNode.getAttribute("uid"); - } + var input = nodes[i].childNodesWithTag("input")[0]; + log("input: " + input + input.checked); + if (input.checked) + list.push(nodes[i].getAttribute("uid")); } - if (list.length) - CalendarBaseURL = (UserFolderURL + "Groups/_custom_" - + list.join(",") + "/Calendar/"); - else - CalendarBaseURL = ApplicationBaseURL; + if (!list.length) { + list.push(nodes[0].getAttribute("uid")); + nodes[0].childNodesWithTag("input")[0].checked = true; + } + CalendarBaseURL = (UserFolderURL + "Groups/_custom_" + + list.join(",") + "/Calendar/"); refreshAppointments(); refreshTasks(); @@ -792,7 +792,7 @@ function inhibitMyCalendarEntry() } } -function updateCalendarsList() +function updateCalendarsList(method) { var url = (ApplicationBaseURL + "updateCalendars?ids=" + calendarUidsList()); @@ -802,6 +802,8 @@ function updateCalendarsList() } document.calendarsListAjaxRequest = triggerAjaxRequest(url, calendarsListCallback); + if (method == "removal") + updateCalendarStatus(); } function initCalendarContactsSelector(selId)