diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index 542575b37..a7227102c 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -1645,7 +1645,7 @@ function onCalendarModify(event) { var selected = folders.getSelectedNodes()[0]; var calendarID = selected.getAttribute("id"); var url = ApplicationBaseURL + calendarID + "/properties"; - var windowID = (calendarID + "properties").replace("/", "_", "g"); + var windowID = sanitizeWindowName(calendarID + " properties"); var properties = window.open(url, windowID, "width=300,height=100,resizable=0"); properties.focus(); @@ -1705,7 +1705,7 @@ function appendCalendar(folderName, folderPath) { window.alert(clabels["You have already subscribed to that folder!"]); else { var calendarList = $("calendarList"); - var items = calendarList.childNodesWithTag("li"); + var items = calendarList.select("li"); var li = document.createElement("li"); // Add the calendar to the proper place @@ -1715,13 +1715,13 @@ function appendCalendar(folderName, folderPath) { else calendarList.appendChild(li); - li.setAttribute("id", folderPath); - li.setAttribute("owner", owner); + $(li).writeAttribute("id", folderPath); + $(li).writeAttribute("owner", owner); var checkBox = createElement("input", null, "checkBox", { checked: 1 }, { type: "checkbox" }, li); li.appendChild(document.createTextNode(" ")); - + var colorBox = document.createElement("div"); li.appendChild(colorBox); li.appendChild(document.createTextNode(folderName diff --git a/UI/WebServerResources/UIxAclEditor.js b/UI/WebServerResources/UIxAclEditor.js index 4e3e97d5f..4f2713a52 100644 --- a/UI/WebServerResources/UIxAclEditor.js +++ b/UI/WebServerResources/UIxAclEditor.js @@ -26,10 +26,11 @@ function addUserCallback(http) { } function setEventsOnUserNode(node) { - node.observe("mousedown", listRowMouseDownHandler); - node.observe("selectstart", listRowMouseDownHandler); - node.observe("dblclick", onOpenUserRights); - node.observe("click", onRowClick); + var n = $(node); + n.observe("mousedown", listRowMouseDownHandler); + n.observe("selectstart", listRowMouseDownHandler); + n.observe("dblclick", onOpenUserRights); + n.observe("click", onRowClick); } function nodeForUser(userName, userId) { diff --git a/UI/WebServerResources/generic.js b/UI/WebServerResources/generic.js index d7e2dce38..5863dccb3 100644 --- a/UI/WebServerResources/generic.js +++ b/UI/WebServerResources/generic.js @@ -177,6 +177,11 @@ function sanitizeMailTo(dirtyMailTo) { return mailto; } +function sanitizeWindowName(dirtyWindowName) { + // IE is picky about the characters used for the window name. + return dirtyWindowName.replace(/[\s\/-]/g, "_"); +} + function openUserFolderSelector(callback, type) { var urlstr = ApplicationBaseURL; if (! urlstr.endsWith('/')) @@ -194,8 +199,7 @@ function openContactWindow(url, wId) { if (typeof wId == "undefined") wId = "_blank"; else { - var r = new RegExp("[\.\/-]", "g"); - wId = wId.replace(r, "_"); + wId = sanitizeWindowName(wId); } var w = window.open(url, wId, @@ -211,8 +215,7 @@ function openMailComposeWindow(url, wId) { if (typeof wId == "undefined") wId = "_blank"; else { - var r = new RegExp("[\.\/-]", "g"); - wId = wId.replace(r, "_"); + wId = sanitizeWindowName(wId); } if (document.body.hasClassName("popup"))