diff options
author | jimmacfx <jimmacfx@4fa712ea-3c06-0410-9261-c11b4c06c003> | 2005-11-25 22:45:21 +0000 |
---|---|---|
committer | jimmacfx <jimmacfx@4fa712ea-3c06-0410-9261-c11b4c06c003> | 2005-11-25 22:45:21 +0000 |
commit | 20407702b92cb93970eaa4a71e659f383d2f92a5 (patch) | |
tree | 063e1fc818a47e1b74e285a7b5e80ac7cb90a306 /www/inc/styles/ie7/ie7-png.js | |
parent | 6429a6080db982bcb37421d9735e25cfec25acec (diff) | |
download | original-20407702b92cb93970eaa4a71e659f383d2f92a5.tar.gz original-20407702b92cb93970eaa4a71e659f383d2f92a5.tar.bz2 |
0.11
git-svn-id: https://forgesvn1.novell.com/svn/original/trunk@8 4fa712ea-3c06-0410-9261-c11b4c06c003
Diffstat (limited to 'www/inc/styles/ie7/ie7-png.js')
-rw-r--r-- | www/inc/styles/ie7/ie7-png.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/www/inc/styles/ie7/ie7-png.js b/www/inc/styles/ie7/ie7-png.js new file mode 100644 index 0000000..f9c7e80 --- /dev/null +++ b/www/inc/styles/ie7/ie7-png.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */
+if(window.IE7)IE7.addModule("ie7-png",function(){if(appVersion<5.5)return;var FILTER="progid:DXImageTransform.Microsoft.AlphaImageLoader(src=%1,sizingMethod='scale')";var NULL=(/\bSV1\b/.test(navigator.userAgent))?makePath("blank.gif",path):"javascript:'#define x_width 1\x5cn#define x_height 1\x5cnstatic char x_bits[]={0x00}'";var pngTest=new RegExp((window.IE7_PNG_SUFFIX||"-trans.png")+"$","i");function addFilter(element,src){element.runtimeStyle.filter=FILTER.replace(/%1/,src)};var MATCH=/background(-image)?\s*:([^(};]*)url\(([^\)]+)\)([^;}]*)/gi;CSSFixes.addFix(MATCH,function replace(match,image,prefix,url,suffix){url=getString(url);return pngTest.test(url)?"filter:"+FILTER.replace(/scale/,"crop").replace(/%1/,url)+";zoom:1;background"+(image||"")+":"+(prefix||"")+"none"+(suffix||""):match});if(HTMLFixes){function fixImg(element){if(pngTest.test(element.src)){var width=element.width,height=element.height;addFilter(element,element.src);element.src=NULL;element.width=width;element.height=height}else element.runtimeStyle.filter=""};HTMLFixes.add("img,input",function(element){if(element.tagName=="INPUT"&&element.type!="image")return;fixImg(element);addEventHandler(element,"onpropertychange",function(){if(event.propertyName=="src")fixImg(element)})})}});
|