From 7c7989065c095efe14486856b70d51b61cae88d2 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Thu, 6 Dec 2012 13:02:06 -0500 Subject: [PATCH 1/4] prototype.js: Fix handling of opacity in IE --- UI/WebServerResources/prototype.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UI/WebServerResources/prototype.js b/UI/WebServerResources/prototype.js index 37dd39ac2..bdc0f9f23 100644 --- a/UI/WebServerResources/prototype.js +++ b/UI/WebServerResources/prototype.js @@ -3157,7 +3157,7 @@ Ajax.PeriodicalUpdater = Class.create(Ajax.Base, { var filter = Element.getStyle(element, 'filter'); if (filter.length === 0) return 1.0; var match = (filter || '').match(/alpha\(opacity=(.*)\)/); - if (match[1]) return parseFloat(match[1]) / 100; + if (match && match[1]) return parseFloat(match[1]) / 100; return 1.0; } From 128368f66c979e7a59ffaba8519d93f45338a7ab Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Thu, 6 Dec 2012 13:03:10 -0500 Subject: [PATCH 2/4] Fix search when accessing users folders --- .../UIxContactsUserFolders.css | 2 +- .../UIxContactsUserFolders.js | 26 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/UI/WebServerResources/UIxContactsUserFolders.css b/UI/WebServerResources/UIxContactsUserFolders.css index 3ada1e7ba..a397a06a2 100644 --- a/UI/WebServerResources/UIxContactsUserFolders.css +++ b/UI/WebServerResources/UIxContactsUserFolders.css @@ -1,4 +1,4 @@ -DIV#filterPanel +DIV.filterPanel { position: absolute; text-align: center; width: auto; diff --git a/UI/WebServerResources/UIxContactsUserFolders.js b/UI/WebServerResources/UIxContactsUserFolders.js index acba23992..71b862a55 100644 --- a/UI/WebServerResources/UIxContactsUserFolders.js +++ b/UI/WebServerResources/UIxContactsUserFolders.js @@ -1,7 +1,7 @@ var d; -function onSearchFormSubmit() { - var searchValue = $("searchValue"); +function onSearchFormSubmit(filterPanel) { + var searchValue = filterPanel.down('[name="search"]'); var encodedValue = encodeURI(searchValue.value); if (encodedValue.blank()) { @@ -15,7 +15,7 @@ function onSearchFormSubmit() { document.userFoldersRequest.abort(); } if (encodedValue.trim().length > minimumSearchLength) { - startAnimation($("pageContent"), $("filterPanel")); + startAnimation($("pageContent"), filterPanel); document.userFoldersRequest = triggerAjaxRequest(url, usersSearchCallback); } @@ -93,14 +93,14 @@ function buildUsersTree(treeDiv, response) { for (var i = 0; i < response.length; i++) { if (!isUserDialog) { var toggle = $("tgd" + (1 + i * 2)); - toggle.observe ("click", onUserNodeToggle); + toggle.on("click", onUserNodeToggle); } var sd = $("sd" + (1 + i * multiplier)); - sd.observe("click", onTreeItemClick); + sd.on("click", onTreeItemClick); } } else { - $("searchValue").addClassName("notfound"); + $$('[name="searchValue"]').first().addClassName("notfound"); } } @@ -160,14 +160,14 @@ function foldersSearchCallback(http) { //dd.update(str); for (var i = 1; i < folders.length; i++) { var sd = $("sd" + (nodeId + i)); - sd.observe("click", onTreeItemClick); + sd.on("click", onTreeItemClick); } } else { dd.innerHTML = ''; dd.appendChild(addFolderNotFoundNode (d, nodeId, null)); var sd = $("sd" + (nodeId + 1)); - sd.observe("click", onTreeItemClick); + sd.on("click", onTreeItemClick); } d.aIndent.pop(); @@ -241,7 +241,7 @@ function onConfirmFolderSelection(event) { function onFolderSearchKeyDown(event) { if (event.keyCode == Event.KEY_BACKSPACE || IsCharacterKey(event.keyCode)) { - $("searchValue").removeClassName("notfound"); + $(this).removeClassName("notfound"); var div = $("folders"); if (!div.clean) { var oldD = $("d"); // the folders tree @@ -256,11 +256,11 @@ function onFolderSearchKeyDown(event) { } function initUserFoldersWindow() { - var searchValue = $("searchValue"); - searchValue.observe("keydown", onFolderSearchKeyDown); + var searchValue = $$('[name="search"]').first(); + searchValue.on("keydown", onFolderSearchKeyDown); - $("addButton").observe("click", onConfirmFolderSelection); - $("doneButton").observe("click", onCloseButtonClick); + $("addButton").on("click", onConfirmFolderSelection); + $("doneButton").on("click", onCloseButtonClick); searchValue.focus(); } From 99669f2d5c1c32c4753a47edf12de9c6a5beb94f Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Thu, 6 Dec 2012 13:05:54 -0500 Subject: [PATCH 3/4] Fix dynamic CSS in IE8 When adding a calendar or subscribing to a calendar, the dynamic CSS was not properly applied in IE8. This new technique seems to fix all cases. --- UI/WebServerResources/SchedulerUI.js | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index 00d15c5c8..137b8ee3c 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -3096,21 +3096,15 @@ function appendStyleElement(folderPath, color) { var fgColor = getContrastingTextColor(color); var styleElement = document.createElement("style"); styleElement.type = "text/css"; - var selectors = [ - 'DIV.calendarFolder' + folderPath.substr(1), - 'LI.calendarFolder' + folderPath.substr(1), - 'UL#calendarList DIV.calendarFolder' + folderPath.substr(1) - ]; - var rules = [ - ' { background-color: ' + color + ' !important;' + ' color: ' + fgColor + ' !important; }', - ' { background-color: ' + color + ' !important;' + ' color: ' + fgColor + ' !important; }', - ' { color: ' + color + ' !important; }' - ]; - for (var i = 0; i < rules.length; i++) - if (styleElement.styleSheet && styleElement.styleSheet.addRule) - styleElement.styleSheet.addRule(selectors[i], rules[i]); // IE - else - styleElement.appendChild(document.createTextNode(selectors[i] + rules[i])); // Mozilla + Safari + + var styles = ' .calendarFolder' + folderPath.substr(1) + + ' { background-color: ' + color + ' !important;' + ' color: ' + fgColor + ' !important; }' + + ' div.colorBox.calendarFolder' + folderPath.substr(1) + + ' { color: ' + color + ' !important; }'; + + if (styleElement.styleSheet) styleElement.styleSheet.cssText = styles; // IE + else styleElement.appendChild(document.createTextNode(styles)); // Mozilla + Webkit + document.getElementsByTagName("head")[0].appendChild(styleElement); } } From ed8c4a8f548ad349133cf8b2650f08d10879c29e Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Thu, 6 Dec 2012 13:07:45 -0500 Subject: [PATCH 4/4] Update ChangeLog --- ChangeLog | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/ChangeLog b/ChangeLog index aba47c924..ce8076be9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,40 @@ +commit 99669f2d5c1c32c4753a47edf12de9c6a5beb94f +Author: Francis Lachapelle +Date: Thu Dec 6 13:05:54 2012 -0500 + + Fix dynamic CSS in IE8 + + When adding a calendar or subscribing to a calendar, the dynamic CSS was + not properly applied in IE8. This new technique seems to fix all cases. + +M UI/WebServerResources/SchedulerUI.js + +commit 128368f66c979e7a59ffaba8519d93f45338a7ab +Author: Francis Lachapelle +Date: Thu Dec 6 13:03:10 2012 -0500 + + Fix search when accessing users folders + +M UI/WebServerResources/UIxContactsUserFolders.css +M UI/WebServerResources/UIxContactsUserFolders.js + +commit 7c7989065c095efe14486856b70d51b61cae88d2 +Author: Francis Lachapelle +Date: Thu Dec 6 13:02:06 2012 -0500 + + prototype.js: Fix handling of opacity in IE + +M UI/WebServerResources/prototype.js + +commit f1413121957f66d546e29c709507d14a5a809e9d +Author: Francis Lachapelle +Date: Thu Dec 6 10:36:11 2012 -0500 + + Update ChangeLog + +M ChangeLog +M NEWS + commit 2a5e0aeaa96920752ba88be91f31eab4a92dafe9 Author: Francis Lachapelle Date: Thu Dec 6 10:32:31 2012 -0500