[Phpfreechat-svn] SF.net SVN: phpfreechat: [1152] trunk/themes/default
Status: Beta
Brought to you by:
kerphi
|
From: <gpi...@us...> - 2007-08-28 00:36:25
|
Revision: 1152
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1152&view=rev
Author: gpinzone
Date: 2007-08-27 17:36:27 -0700 (Mon, 27 Aug 2007)
Log Message:
-----------
Added fix for PNG transparency on IE 5.5 and IE 6.0 to default theme. Does not affect any other browsers.
Modified Paths:
--------------
trunk/themes/default/style.css.php
Added Paths:
-----------
trunk/themes/default/iepngfix.htc
trunk/themes/default/images/blank.gif
Added: trunk/themes/default/iepngfix.htc
===================================================================
--- trunk/themes/default/iepngfix.htc (rev 0)
+++ trunk/themes/default/iepngfix.htc 2007-08-28 00:36:27 UTC (rev 1152)
@@ -0,0 +1,71 @@
+<public:component>
+<public:attach event="onpropertychange" onevent="doFix()" />
+
+<script type="text/javascript">
+
+// IE5.5+ PNG Alpha Fix v1.0RC4
+// (c) 2004-2005 Angus Turnbull http://www.twinhelix.com
+
+// This is licensed under the CC-GNU LGPL, version 2.1 or later.
+// For details, see: http://creativecommons.org/licenses/LGPL/2.1/
+
+// This must be a path to a blank image. That's all the configuration you need.
+if (typeof blankImg == 'undefined')
+{
+ var blankImg = document.URL;
+ blankImg = blankImg.substring(0,blankImg.lastIndexOf("/")+1) + "images/blank.gif";
+ //blankImg = blankImg + "/../images/blank.gif";
+}
+
+var f = 'DXImageTransform.Microsoft.AlphaImageLoader';
+
+function filt(s, m)
+{
+ if (filters[f])
+ {
+ filters[f].enabled = s ? true : false;
+ if (s) with (filters[f]) { src = s; sizingMethod = m }
+ }
+ else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")';
+}
+
+function doFix()
+{
+ // Assume IE7 is OK.
+ if (!/MSIE (5\.5|6\.)/.test(navigator.userAgent) ||
+ (event && !/(background|src)/.test(event.propertyName))) return;
+
+ var bgImg = currentStyle.backgroundImage || style.backgroundImage;
+
+ if (tagName == 'IMG')
+ {
+ if ((/\.png$/i).test(src))
+ {
+ if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
+ style.width = offsetWidth + 'px';
+ filt(src, 'scale');
+ src = blankImg;
+ }
+ else if (src.indexOf(blankImg) < 0) filt();
+ }
+ else if (bgImg && bgImg != 'none')
+ {
+ if (bgImg.match(/^url[("']+(.*\.png)[)"']+$/i))
+ {
+ var s = RegExp.$1;
+ if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
+ style.width = offsetWidth + 'px';
+ style.backgroundImage = 'none';
+ filt(s, 'crop');
+ // IE link fix.
+ for (var n = 0; n < childNodes.length; n++)
+ if (childNodes[n].style) childNodes[n].style.position = 'relative';
+ }
+ else filt();
+ }
+}
+
+doFix();
+
+</script>
+</public:component>
\ No newline at end of file
Added: trunk/themes/default/images/blank.gif
===================================================================
(Binary files differ)
Property changes on: trunk/themes/default/images/blank.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/themes/default/style.css.php
===================================================================
--- trunk/themes/default/style.css.php 2007-08-27 19:55:29 UTC (rev 1151)
+++ trunk/themes/default/style.css.php 2007-08-28 00:36:27 UTC (rev 1152)
@@ -1,3 +1,7 @@
+img, div {
+ behavior: url("<?php echo $c->getFileUrlFromTheme('iepngfix.htc'); ?>");
+}
+
/*
will break display (margins, paddings) on IE6
div#pfc_container * {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|