summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-05-18 16:28:38 +0000
committeralecpl <alec@alec.pl>2010-05-18 16:28:38 +0000
commit98ef63c106879af28d34aed19c3b57f3f5db6cab (patch)
treef82ad7375ce61d952d07ae7ac9d819a5f715daa0
parent6a86d2727ac16eb65d5ab5b920f0fa70fbfeef7d (diff)
- Fixes for IE6 (updated pngbehaviour.htc)
-rw-r--r--THREADS4
-rw-r--r--skins/default/ie6hacks.css6
-rw-r--r--skins/default/images/icons/collapsed.pngbin205 -> 184 bytes
-rw-r--r--skins/default/images/icons/expanded.pngbin184 -> 169 bytes
-rw-r--r--skins/default/pngbehavior.htc118
5 files changed, 70 insertions, 58 deletions
diff --git a/THREADS b/THREADS
index 2b1bf89f8..bc3ee2647 100644
--- a/THREADS
+++ b/THREADS
@@ -9,7 +9,3 @@ TODO (must have):
TODO (other):
- button in #listcontrols to mark all messages in current thread (with selected
root or child message),
-
-KNOWN ISSUES:
- - IE6: message, flag, attachment icons are not displayed in
- initially collapsed child rows
diff --git a/skins/default/ie6hacks.css b/skins/default/ie6hacks.css
index f5e1c2aa8..87c648351 100644
--- a/skins/default/ie6hacks.css
+++ b/skins/default/ie6hacks.css
@@ -10,6 +10,12 @@ img
behavior: url(skins/default/pngbehavior.htc);
}
+#header img
+{
+ width: 178px;
+ height: 47px;
+}
+
#message div.notice,
#message div.error,
#message div.warning,
diff --git a/skins/default/images/icons/collapsed.png b/skins/default/images/icons/collapsed.png
index e483b17e2..07cc1ec7d 100644
--- a/skins/default/images/icons/collapsed.png
+++ b/skins/default/images/icons/collapsed.png
Binary files differ
diff --git a/skins/default/images/icons/expanded.png b/skins/default/images/icons/expanded.png
index 74726c8ae..1db079b79 100644
--- a/skins/default/images/icons/expanded.png
+++ b/skins/default/images/icons/expanded.png
Binary files differ
diff --git a/skins/default/pngbehavior.htc b/skins/default/pngbehavior.htc
index 54ee96890..fb5f1c8d4 100644
--- a/skins/default/pngbehavior.htc
+++ b/skins/default/pngbehavior.htc
@@ -1,74 +1,84 @@
-<public:component>
+<public:component lightWeight="true">
<public:attach event="onpropertychange" onevent="propertyChanged()" />
-<public:attach event="onbeforeprint" for="window" onevent="beforePrint()" />
-<public:attach event="onafterprint" for="window" onevent="afterPrint()" />
+<public:attach event="onbeforeprint" onevent="beforePrint()" for="window"/>
+<public:attach event="onafterprint" onevent="afterPrint()" for="window"/>
<script>
/*
* PNG Behavior
*
- * This script was created by Erik Arvidsson (erik(at)eae.net)
+ * This script was created by Erik Arvidsson (http://webfx.eae.net/contact.html#erik)
* for WebFX (http://webfx.eae.net)
- * Copyright 2002
- *
- * For usage see license at http://webfx.eae.net/license.html
+ * Copyright 2002-2004
*
- * Version: 1.01a
+ * For usage see license at http://webfx.eae.net/license.html
+ *
+ * Version: 1.02
+ * Created: 2001-??-?? First working version
+ * Updated: 2002-03-28 Fixed issue when starting with a non png image and
+ * switching between non png images
+ * 2003-01-06 Fixed RegExp to correctly work with IE 5.0x
+ * 2004-05-09 When printing revert to original
*
*/
-
-var IS_PNG = /\.png$/i;
-var supported = /MSIE ((5\.5)|6)/.test(navigator.userAgent) && navigator.platform == 'Win32';
-var realSrc, realHeight, realWidth;
-var blankSrc = 'skins/default/images/blank.gif';
+
+var supported = /MSIE ((5\.5)|6)/.test(navigator.userAgent) && navigator.platform == "Win32",
+ realSrc,
+ blankSrc = "skins/default/images/blank.gif",
+ isPrinting = false;
+
if (supported) fixImage();
+
function propertyChanged() {
- if (supported && event.propertyName == 'src') {
- var i = element.src.lastIndexOf(blankSrc);
- if (i == -1 || i != element.src.length - blankSrc.length) {
- fixImage();
- }
- }
-}
+ if (!supported || isPrinting) return;
+
+ var pName = event.propertyName;
+ if (pName != "src") return;
+ // if not set to blank
+ if (!new RegExp(blankSrc).test(src))
+ fixImage();
+};
+
function fixImage() {
- if (realSrc && element.src == realSrc) {
- // this is an attempt to set the image to itself!
- // pointless - leave the filter as-is, restore the blank image
- element.src = blankSrc;
- } else {
- // set the image to something different
- if (IS_PNG.test(element.src)) {
- // fixable PNG
- realSrc = element.src;
- realWidth = element.width;
- realHeight = element.height;
- element.src = blankSrc;
- element.style.width = realWidth + 'px';
- element.style.height = realHeight + 'px';
- element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + encodeURI(realSrc) + "',sizingMethod='scale')";
- } else {
- // ordinary image - make sure the fix is removed
- if (realSrc) {
- realSrc = null;
- element.runtimeStyle.filter = '';
- }
- }
- }
+ // get src
+ var src = element.src;
+
+ // check for real change
+ if (src == realSrc && /\.png$/i.test(src)) {
+ element.src = blankSrc;
+ return;
+ }
+
+ if ( ! new RegExp(blankSrc).test(src)) {
+ // backup old src
+ realSrc = src;
+ }
+
+ // test for png
+ if (/\.png$/i.test(realSrc)) {
+ // set blank image
+ element.src = blankSrc;
+ // set filter
+ element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft." +
+ "AlphaImageLoader(src='" + src + "',sizingMethod='scale')";
+ }
+ else {
+ // remove filter
+ element.runtimeStyle.filter = "";
+ }
}
+
function beforePrint() {
- if (realSrc) {
- supported = false;
- element.src = realSrc;
- element.runtimeStyle.filter = '';
- supported = true;
- }
+ isPrinting = true;
+ element.src = realSrc;
+ element.runtimeStyle.filter = "";
+ realSrc = null;
}
+
function afterPrint() {
- if (realSrc) {
- var rs = realSrc;
- realSrc = null;
- element.src = rs;
- }
+ isPrinting = false;
+ fixImage();
}
+
</script>
</public:component>