Summary: ThickBox
Name: jquery-thickbox
Version: 3.1
-Release: 1
+Release: 2
License: MIT / GPL
Group: Applications/WWW
-Source0: http://jquery.com/demo/thickbox/thickbox-code/thickbox-compressed.js
-# Source0-md5: 62ecf3e9b248f69a043ca7653866b146
+Source0: http://jquery.com/demo/thickbox/thickbox-code/thickbox.js
+# Source0-md5: 1ef1a46c2b1b984cdc3332eb74bad1d5
Source1: http://jquery.com/demo/thickbox/thickbox-code/thickbox.css
# Source1-md5: 9b2903ebee6d54b3e63ba927ea5dd498
Source2: http://jquery.com/demo/thickbox/images/loadingAnimation.gif
# Source2-md5: c33734a1bf58bec328ffa27872e96ae1
URL: http://jquery.com/demo/thickbox/
Patch0: no-global-css.patch
+Patch1: no-doctype.patch
BuildRequires: rpmbuild(macros) > 1.268
BuildRequires: yuicompressor
Requires: jquery
%prep
%setup -qcT
-cp -a %{SOURCE0} thickbox.js
+cp -a %{SOURCE0} .
cp -a %{SOURCE1} .
cp -a %{SOURCE2} .
%patch0 -p1
+%patch1 -p0
# apache1/apache2 conf
cat > apache.conf <<'EOF'
--- /dev/null
+--- thickbox.js.orig 2008-10-21 22:21:05.000000000 +0300
++++ thickbox.js 2009-09-29 14:20:41.592474178 +0300
+@@ -31,7 +31,7 @@
+ function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link
+
+ try {
+- if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
++ if (!document.body.style.maxHeight && document.documentElement.clientHeight) {//if IE 6 with doctype
+ $("body","html").css({height: "100%", width: "100%"});
+ $("html").css("overflow","hidden");
+ if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6
+@@ -270,7 +270,7 @@
+ $("#TB_closeWindowButton").unbind("click");
+ $("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});
+ $("#TB_load").remove();
+- if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
++ if (!document.body.style.maxHeight && document.documentElement.clientHeight) {//if IE 6 with doctype
+ $("body","html").css({height: "auto", width: "auto"});
+ $("html").css("overflow","");
+ }
+@@ -281,7 +281,7 @@
+
+ function tb_position() {
+ $("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'});
+- if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) { // take away IE6
++ if (document.documentElement && document.documentElement.clientHeight && navigator.userAgent.indexOf("MSIE 6") === -1) { // take away IE6 && quirks mode
+ $("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
+ }
+ }