You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2011/05/02 20:43:21 UTC
svn commit: r1098724 -
/myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/popcalendar.js
Author: lu4242
Date: Mon May 2 18:43:21 2011
New Revision: 1098724
URL: http://svn.apache.org/viewvc?rev=1098724&view=rev
Log:
TOMAHAWK-1557 InputDate calendar popup does not render correctly on IE7
Modified:
myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/popcalendar.js
Modified: myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/popcalendar.js
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/popcalendar.js?rev=1098724&r1=1098723&r2=1098724&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/popcalendar.js (original)
+++ myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/popcalendar.js Mon May 2 18:43:21 2011
@@ -298,7 +298,7 @@ org_apache_myfaces_PopupCalendar.prototy
this.containerCtl.appendChild(this.calendarDiv);
var mainTable = document.createElement("table");
- mainTable.setAttribute("style", "width:" + ((this.initData.showWeekNumber == 1)?250:220) + "px;");
+ Element.setStyle(mainTable, "width:" + ((this.initData.showWeekNumber == 1)?250:220) + "px;");
mainTable.className = this.initData.themePrefix + "-table-style";
this.calendarDiv.appendChild(mainTable);
@@ -317,7 +317,7 @@ org_apache_myfaces_PopupCalendar.prototy
mainRow.appendChild(mainCell);
var contentTable = document.createElement("table");
- contentTable.setAttribute("style", "width:" + ((this.initData.showWeekNumber == 1)?248:218) + "px;");
+ Element.setStyle(contentTable, "width:" + ((this.initData.showWeekNumber == 1)?248:218) + "px;");
var contentBody = document.createElement("tbody");
contentTable.appendChild(contentBody);
@@ -337,7 +337,7 @@ org_apache_myfaces_PopupCalendar.prototy
if (this._isMonthSelectable())
{
var acceptMonthCell = document.createElement("td");
- acceptMonthCell.setAttribute("style", "text-align:right;");
+ Element.setStyle(acceptMonthCell, "text-align:right;");
headerRow.appendChild(acceptMonthCell);
var acceptMonthLink = document.createElement("a");
@@ -357,7 +357,7 @@ org_apache_myfaces_PopupCalendar.prototy
}
var closeButtonCell = document.createElement("td");
- closeButtonCell.setAttribute("style", "text-align:right;");
+ Element.setStyle(closeButtonCell, "text-align:right;");
headerRow.appendChild(closeButtonCell);
var closeCalendarLink = document.createElement("a");
@@ -533,7 +533,7 @@ org_apache_myfaces_PopupCalendar.prototy
imgLeft.setAttribute("src", this.initData.imgDir + direction + "1.gif");
imgLeft.setAttribute("width","10px");
imgLeft.setAttribute("height","11px");
- imgLeft.setAttribute("style", "border:0px;")
+ Element.setStyle(imgLeft, "border:0px;");
var spanLeft = document.createElement("span");
@@ -717,7 +717,7 @@ org_apache_myfaces_PopupCalendar.prototy
{
var selectMonthTable = document.createElement("table");
- selectMonthTable.setAttribute("style", "width:70px;border-collapse:collapse;")
+ Element.setStyle(selectMonthTable, "width:70px;border-collapse:collapse;");
selectMonthTable.className = this.initData.themePrefix + "-dropdown-style";
this._removeAllChildren(this.selectMonthDiv);
@@ -750,7 +750,7 @@ org_apache_myfaces_PopupCalendar.prototy
if (i == this.selectedDate.month)
{
sNameNode = document.createElement("span");
- sNameNode.setAttribute("style", "font-weight:bold;");
+ Element.setStyle(sNameNode, "font-weight:bold;");
sNameNode.appendChild(document.createTextNode(sName));
sNameNode.setAttribute("userData",i);
}
@@ -871,7 +871,7 @@ org_apache_myfaces_PopupCalendar.prototy
{
var selectYearTable = document.createElement("table");
- selectYearTable.setAttribute("style", "width:44px;border-collapse:collapse;")
+ Element.setStyle(selectYearTable, "width:44px;border-collapse:collapse;");
selectYearTable.className = this.initData.themePrefix + "-dropdown-style";
this._removeAllChildren(this.selectYearDiv);
@@ -947,7 +947,7 @@ org_apache_myfaces_PopupCalendar.prototy
if (i == this.selectedDate.year)
{
sNameNode = document.createElement("span");
- sNameNode.setAttribute("style", "font-weight:bold;");
+ Element.setStyle(sNameNode, "font-weight:bold;");
sNameNode.appendChild(document.createTextNode(sName));
sNameNode.setAttribute("userData", sName);
}
@@ -1058,7 +1058,7 @@ org_apache_myfaces_PopupCalendar.prototy
org_apache_myfaces_PopupCalendar.prototype._appendCell = function(parentElement, value)
{
var cell = document.createElement("td");
- cell.setAttribute("style", "text-align:right;");
+ Element.setStyle(cell, "text-align:right;");
if (value && value != "")
{
@@ -1131,7 +1131,7 @@ org_apache_myfaces_PopupCalendar.prototy
sNormalStyle, sSelectStyle)
{
var cell = document.createElement("td");
- cell.setAttribute("style", "text-align:right;");
+ Element.setStyle(cell, "text-align:right;");
var weekDate = this.stdDateFormatter.getWeekDate(startDate);
if (weekSelectable)
@@ -1217,7 +1217,7 @@ org_apache_myfaces_PopupCalendar.prototy
this._removeAllChildren(this.contentSpan);
var contentTable = document.createElement("table");
- contentTable.setAttribute("style", "border:0px;")
+ Element.setStyle(contentTable, "border:0px;");
contentTable.className = this.initData.themePrefix + "-body-style";
this.contentSpan.appendChild(contentTable);
@@ -1231,14 +1231,14 @@ org_apache_myfaces_PopupCalendar.prototy
if (this.initData.showWeekNumber == 1)
{
var showWeekNumberCell = document.createElement("td");
- showWeekNumberCell.setAttribute("style", "width:27px;font-weight:bold;");
+ Element.setStyle(showWeekNumberCell, "width:27px;font-weight:bold;");
contentRow.appendChild(showWeekNumberCell);
showWeekNumberCell.appendChild(document.createTextNode(this.initData.weekString));
var dividerCell = document.createElement("td");
- dividerCell.setAttribute("style", "width:1px;")
+ Element.setStyle(dividerCell, "width:1px;");
if(this.ie) //fix for https://issues.apache.org/jira/browse/TOMAHAWK-1184
dividerCell.setAttribute("rowSpan", "7");
else
@@ -1249,14 +1249,14 @@ org_apache_myfaces_PopupCalendar.prototy
var dividerImg = document.createElement("img");
dividerImg.setAttribute("src", this.initData.imgDir + "divider.gif");
- dividerImg.setAttribute("style", "width:1px;");
+ Element.setStyle(dividerImg, "width:1px;");
dividerCell.appendChild(dividerImg);
}
for (i = 0; i < 7; i++)
{
var dayNameCell = document.createElement("td");
- dayNameCell.setAttribute("style", "width:27px;text-align:right;font-weight:bold;")
+ Element.setStyle(dayNameCell, "width:27px;text-align:right;font-weight:bold;");
contentRow.appendChild(dayNameCell);
dayNameCell.appendChild(document.createTextNode(this.initData.dayName[i]));
@@ -1283,7 +1283,7 @@ org_apache_myfaces_PopupCalendar.prototy
{
dayPointer++;
var dateCell = document.createElement("td");
- dateCell.setAttribute("style", "text-align:right;");
+ Element.setStyle(dateCell, "text-align:right;");
currentRow.appendChild(dateCell);
@@ -1367,7 +1367,7 @@ org_apache_myfaces_PopupCalendar.prototy
this.changeMonthImg.setAttribute("src", this.initData.imgDir + "drop1.gif");
this.changeMonthImg.setAttribute("width","12px");
this.changeMonthImg.setAttribute("height","10px");
- this.changeMonthImg.setAttribute("style", "border:0px;");
+ Element.setStyle(this.changeMonthImg, "border:0px;");
this.monthSpan.appendChild(this.changeMonthImg);
@@ -1380,7 +1380,7 @@ org_apache_myfaces_PopupCalendar.prototy
this.changeYearImg.setAttribute("src", this.initData.imgDir + "drop1.gif");
this.changeYearImg.setAttribute("width","12px");
this.changeYearImg.setAttribute("height","10px");
- this.changeYearImg.setAttribute("style", "border:0px;");
+ Element.setStyle(this.changeYearImg, "border:0px;");
this.yearSpan.appendChild(this.changeYearImg);
// Accept Month icon
@@ -1391,7 +1391,7 @@ org_apache_myfaces_PopupCalendar.prototy
acceptMonthImg.setAttribute("src", this.initData.imgDir + "accept.gif");
acceptMonthImg.setAttribute("width","15px");
acceptMonthImg.setAttribute("height","13px");
- acceptMonthImg.setAttribute("style", "border:0px;");
+ Element.setStyle(acceptMonthImg, "border:0px;");
acceptMonthImg.setAttribute("alt", "Accept the current month selection");
this.acceptMonthSpan.appendChild(acceptMonthImg);
}
@@ -1402,7 +1402,7 @@ org_apache_myfaces_PopupCalendar.prototy
closeButtonImg.setAttribute("src", this.initData.imgDir + "close.gif");
closeButtonImg.setAttribute("width","15px");
closeButtonImg.setAttribute("height","13px");
- closeButtonImg.setAttribute("style", "border:0px;");
+ Element.setStyle(closeButtonImg, "border:0px;");
closeButtonImg.setAttribute("alt", "Close the calendar");
this.closeCalendarSpan.appendChild(closeButtonImg);