Improved support for IE8/9

This commit is contained in:
Francis Lachapelle
2012-09-25 12:00:47 -04:00
parent f08594e7ec
commit 68efae1055
7 changed files with 14 additions and 24 deletions

View File

@@ -1910,14 +1910,14 @@ function adjustCalendarHeaderDIV() {
styleElement.type = "text/css";
var selectors = ["DIV#calendarHeader DIV.dayLabels",
"DIV#calendarHeader DIV.days"];
var rule = ("{ right: " + delta + "px; }");
var rule = ("right: " + delta + "px");
if (styleElement.styleSheet && styleElement.styleSheet.addRule) {
// IE
styleElement.styleSheet.addRule(selectors[0], rule);
styleElement.styleSheet.addRule(selectors[1], rule);
} else {
// Mozilla + Firefox
var styleText = selectors.join(",") + " " + rule;
var styleText = selectors.join(",") + " { " + rule + "; }";
styleElement.appendChild(document.createTextNode(styleText));
}
document.getElementsByTagName("head")[0].appendChild(styleElement);