Rev 130 Rev 139
Line 1... Line 1...
1 /* 1 /*
2 IE7, version 0.9 (alpha) (2005-08-19) 2 IE7, version 0.9 (alpha) (2005-08-19)
3 Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/) 3 Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
4 License: http://creativecommons.org/licenses/LGPL/2.1/ 4 License: http://creativecommons.org/licenses/LGPL/2.1/
5 */ 5 */
6 IE7.addModule("ie7-html4",function(){if(!isHTML)return;HEADER+="h1{font-size:2em}h2{font-size:1.5em;}h3{font-size:1.17em;}"+"h4{font-size:1em}h5{font-size:.83em}h6{font-size:.67em}";var _0={};ie7HTML=new(Fix.specialize({init:DUMMY,addFix:function(){this.fixes.push(arguments)},apply:function(){for(var i=0;i<this.fixes.length;i++){var m=cssQuery(this.fixes[i][0]);var f=this.fixes[i][1]||_1;for(var j=0;j<m.length;j++)f(m[j])}},addRecalc:function(){this.recalcs.push(arguments)},recalc:function(){for(var i=0;i<this.recalcs.length;i++){var m=cssQuery(this.recalcs[i][0]);var r=this.recalcs[i][1],e;var k=Math.pow(2,i);for(var j=0;(e=m[j]);j++){var u=e.uniqueID;if((_0[u]&k)==0){e=r(e)||e;_0[u]|=k}}}}}));ie7HTML.addFix("abbr");ie7HTML.addRecalc("label",function(e){if(!e.htmlFor){var f=cssQuery("input,textarea",e)[0];if(f){addEventHandler(e,"onclick",function(){f.click()})}}});ie7HTML.addRecalc("button,input",function(e){if(e.tagName=="BUTTON"){var m=e.outerHTML.match(/ value="([^"]*)"/i);e.runtimeStyle.value=(m)?m[1]:""}if(e.type=="submit"){addEventHandler(e,"onclick",function(){e.runtimeStyle.clicked=true;setTimeout("document.all."+e.uniqueID+".runtimeStyle.clicked=false",1)})}});var U=/^(submit|reset|button)$/;ie7HTML.addRecalc("form",function(e){addEventHandler(e,"onsubmit",function(){for(var i=0;i<e.length;i++){if(_2(e[i])){e[i].disabled=true;setTimeout("document.all."+e[i].uniqueID+".disabled=false",1)}else if(e[i].tagName=="BUTTON"&&e[i].type=="submit"){setTimeout("document.all."+e[i].uniqueID+".value='"+e[i].value+"'",1);e[i].value=e[i].runtimeStyle.value}}})});function _2(e){return U.test(e.type)&&!e.disabled&&!e.runtimeStyle.clicked};ie7HTML.addRecalc("img",function(e){if(e.alt&&!e.title)e.title=""});var P=(appVersion<5.5)?"HTML:":"";function _1(e){var f=document.createElement("<"+P+e.outerHTML.slice(1));if(e.outerHTML.slice(-2)!="/>"){var en="</"+e.tagName+">",n;while((n=e.nextSibling)&&n.outerHTML!=en){f.appendChild(n)}if(n)n.removeNode()}e.parentNode.replaceChild(f,e)}}); 6 IE7.addModule("ie7-html4",function(){if(!isHTML)return;HEADER+="h1{font-size:2em}h2{font-size:1.5em;}h3{font-size:1.17em;}"+"h4{font-size:1em}h5{font-size:.83em}h6{font-size:.67em}";var _0={};ie7HTML=new(Fix.specialize({init:DUMMY,addFix:function(){this.fixes.push(arguments)},apply:function(){for(var i=0;i<this.fixes.length;i++){var m=cssQuery(this.fixes[i][0]);var f=this.fixes[i][1]||_1;for(var j=0;j<m.length;j++)f(m[j])}},addRecalc:function(){this.recalcs.push(arguments)},recalc:function(){for(var i=0;i<this.recalcs.length;i++){var m=cssQuery(this.recalcs[i][0]);var r=this.recalcs[i][1],e;var k=Math.pow(2,i);for(var j=0;(e=m[j]);j++){var u=e.uniqueID;if((_0[u]&k)==0){e=r(e)||e;_0[u]|=k}}}}}));ie7HTML.addFix("abbr");ie7HTML.addRecalc("label",function(e){if(!e.htmlFor){var f=cssQuery("input,textarea",e)[0];if(f){addEventHandler(e,"onclick",function(){f.click()})}}});ie7HTML.addRecalc("button,input",function(e){if(e.tagName=="BUTTON"){var m=e.outerHTML.match(/ value="([^"]*)"/i);e.runtimeStyle.value=(m)?m[1]:""}if(e.type=="submit"){addEventHandler(e,"onclick",function(){e.runtimeStyle.clicked=true;setTimeout("document.all."+e.uniqueID+".runtimeStyle.clicked=false",1)})}});var U=/^(submit|reset|button)$/;ie7HTML.addRecalc("form",function(e){addEventHandler(e,"onsubmit",function(){for(var i=0;i<e.length;i++){if(_2(e[i])){e[i].disabled=true;setTimeout("document.all."+e[i].uniqueID+".disabled=false",1)}else if(e[i].tagName=="BUTTON"&&e[i].type=="submit"){setTimeout("document.all."+e[i].uniqueID+".value='"+e[i].value+"'",1);e[i].value=e[i].runtimeStyle.value}}})});function _2(e){return U.test(e.type)&&!e.disabled&&!e.runtimeStyle.clicked};ie7HTML.addRecalc("img",function(e){if(e.alt&&!e.title)e.title=""});var P=(appVersion<5.5)?"HTML:":"";function _1(e){var f=document.createElement("<"+P+e.outerHTML.slice(1));if(e.outerHTML.slice(-2)!="/>"){var en="</"+e.tagName+">",n;while((n=e.nextSibling)&&n.outerHTML!=en){f.appendChild(n)}if(n)n.removeNode()}e.parentNode.replaceChild(f,e)}});