PageRenderTime 413ms CodeModel.GetById 171ms app.highlight 2ms RepoModel.GetById 239ms app.codeStats 0ms

/b2evolution/emerald/rsc/js/ie7/ie7-squish.js

http://laibcomsthemes.googlecode.com/
JavaScript | 36 lines | 11 code | 7 blank | 18 comment | 6 complexity | e94e0c941ea37d090c39ef10c06a02f5 MD5 | raw file
 1
 2/* ---------------------------------------------------------------------
 3
 4  Squish some IE bugs!
 5
 6  Some of these bug fixes may have adverse effects so they are
 7  not included in the standard library. Add your own if you want.
 8
 9--------------------------------------------------------------------- */
10
11// @NOTE: ie7Layout.boxSizing is the same as the "Holly Hack"
12
13if (IE7.loaded && IE7.appVersion < 7) {
14
15  // "doubled margin" bug
16  // http://www.positioniseverything.net/explorer/doubled-margin.html
17  IE7.CSS.addFix(/(float\s*:\s*(left|right))/, "display:inline;$1");
18
19  // "peekaboo" bug
20  // http://www.positioniseverything.net/explorer/peekaboo.html
21  if (IE7.appVersion >= 6) IE7.CSS.addRecalc("float", "(left|right)", function(element) {
22  	IE7.Layout.boxSizing(element.parentElement); // assing "hasLayout" to parent element
23  	// "doubled margin" bug
24  	element.style.display = "inline";
25  });
26
27  // "unscrollable content" bug
28  // http://www.positioniseverything.net/explorer/unscrollable.html
29  IE7.CSS.addRecalc("position", "absolute|fixed", function(element) {
30  	if (element.offsetParent && element.offsetParent.currentStyle.position == "relative")
31  		IE7.Layout.boxSizing(element.offsetParent); // assing "hasLayout"
32  });
33}
34
35//# // get rid of Microsoft's pesky image toolbar
36//# document.write('<meta http-equiv="imagetoolbar" content="no">');