miscellaneous MSIE compatibility fixes

This commit is contained in:
Andrew Dolgov 2005-09-08 05:39:55 +01:00
parent c05a19f396
commit d5224f0d9c
5 changed files with 42 additions and 16 deletions

View File

@ -400,7 +400,7 @@
$content_link = "<a id=\"FTITLE-$id\" href=\"javascript:view($id,$feed_id);\">" .
$line["title"] . "</a>";
print "<tr class='$class' id='RROW-$id'";
print "<tr class='$class' id='RROW-$id'>";
// onclick=\"javascript:view($id,$feed_id)\">
print "<td valign='center' align='center'>$update_pic</td>";

View File

@ -240,7 +240,11 @@ function disableContainerChildren(id, disable, doc) {
for (var i = 0; i < container.childNodes.length; i++) {
var child = container.childNodes[i];
child.disabled = disable;
try {
child.disabled = disable;
} catch (E) {
}
if (disable) {
if (child.className && child.className.match("button")) {
@ -250,7 +254,7 @@ function disableContainerChildren(id, disable, doc) {
if (child.className && child.className.match("disabledButton")) {
child.className = "button";
}
}
}
}
}

27
pngfix.js Normal file
View File

@ -0,0 +1,27 @@
// stolen from http://homepage.ntlworld.com/bobosola/pngtestfixed.htm
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.
{
for(var i=0; i<document.images.length; i++)
{
var img = document.images[i]
var imgName = img.src.toUpperCase()
if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
{
var imgID = (img.id) ? "id='" + img.id + "' " : ""
var imgClass = (img.className) ? "class='" + img.className + "' " : ""
var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
var imgStyle = "display:inline-block;" + img.style.cssText
if (img.align == "left") imgStyle = "float:left;" + imgStyle
if (img.align == "right") imgStyle = "float:right;" + imgStyle
if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
var strNewHTML = "<span " + imgID + imgClass + imgTitle
+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
img.outerHTML = strNewHTML
i = i-1
}
}
}
window.attachEvent("onload", correctPNG);

View File

@ -38,7 +38,7 @@ table.main td.feeds {
border-width : 1px 0px 0px 0px;
border-style : solid;
border-color : #c0c0c0;
padding : 5px;
padding : 0px;
}
table.main td.headlinesToolbarBox {
@ -211,7 +211,7 @@ a:hover {
#notify {
font-weight : bold;
font-size : small;
font-size : 10pt;
display : none;
width : 350px;
color : gray;
@ -276,17 +276,9 @@ a.button {
}
.disabledButton {
border : 1px solid #d0d0d0;
background : white;
color : #909090;
padding : 1px 5px 1px 5px;
font-size : small;
}
.disabledButton:hover {
background : white;
text-decoration : none;
color : #909090;
border : 1px solid #c0c0c0;
background-color : white;
color : gray;
}
.evenGrayed {

View File

@ -4,6 +4,9 @@
<link rel="stylesheet" href="tt-rss.css" type="text/css">
<script type="text/javascript" src="functions.js"></script>
<script type="text/javascript" src="tt-rss.js"></script>
<!--[if gte IE 5.5000]>
<script type="text/javascript" src="pngfix.js"></script>
<![endif]-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>