]> git.pld-linux.org Git - packages/jquery-thickbox.git/commitdiff
- skip doctype crashing je6 patch
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 30 Sep 2009 13:08:46 +0000 (13:08 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    jquery-thickbox.spec -> 1.4
    no-doctype.patch -> 1.1

jquery-thickbox.spec
no-doctype.patch [new file with mode: 0644]

index 2a9f23f36a81f1461132725bbda803c04789620b..4e5bf2e6b09d4f4c83854822b518581cffba6d03 100644 (file)
@@ -1,17 +1,18 @@
 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
@@ -33,10 +34,11 @@ AJAX in a hybrid modal.
 
 %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'
diff --git a/no-doctype.patch b/no-doctype.patch
new file mode 100644 (file)
index 0000000..3ad8dc8
--- /dev/null
@@ -0,0 +1,29 @@
+--- 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'});
+       }
+ }
This page took 0.030402 seconds and 4 git commands to generate.