]>
Commit | Line | Data |
---|---|---|
a7ee2fa1 ER |
1 | --- thickbox.js.orig 2008-10-21 22:21:05.000000000 +0300 |
2 | +++ thickbox.js 2009-09-29 14:20:41.592474178 +0300 | |
3 | @@ -31,7 +31,7 @@ | |
4 | function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link | |
5 | ||
6 | try { | |
7 | - if (typeof document.body.style.maxHeight === "undefined") {//if IE 6 | |
8 | + if (!document.body.style.maxHeight && document.documentElement.clientHeight) {//if IE 6 with doctype | |
9 | $("body","html").css({height: "100%", width: "100%"}); | |
10 | $("html").css("overflow","hidden"); | |
11 | if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6 | |
12 | @@ -270,7 +270,7 @@ | |
13 | $("#TB_closeWindowButton").unbind("click"); | |
14 | $("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();}); | |
15 | $("#TB_load").remove(); | |
16 | - if (typeof document.body.style.maxHeight == "undefined") {//if IE 6 | |
17 | + if (!document.body.style.maxHeight && document.documentElement.clientHeight) {//if IE 6 with doctype | |
18 | $("body","html").css({height: "auto", width: "auto"}); | |
19 | $("html").css("overflow",""); | |
20 | } | |
21 | @@ -281,7 +281,7 @@ | |
22 | ||
23 | function tb_position() { | |
24 | $("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'}); | |
25 | - if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) { // take away IE6 | |
26 | + if (document.documentElement && document.documentElement.clientHeight && navigator.userAgent.indexOf("MSIE 6") === -1) { // take away IE6 && quirks mode | |
27 | $("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'}); | |
28 | } | |
29 | } |