Index: lams_central/web/includes/javascript/thickbox.patched.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/Attic/thickbox.patched.js,v diff -u -r1.1 -r1.2 --- lams_central/web/includes/javascript/thickbox.patched.js 19 Jun 2009 10:54:17 -0000 1.1 +++ lams_central/web/includes/javascript/thickbox.patched.js 6 Jul 2009 11:04:28 -0000 1.2 @@ -5,7 +5,7 @@ * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php */ -var tb_pathToImage = pathToImageFolder + "loadingAnimation.gif"; +var tb_pathToImage = "images/loadingAnimation.gif"; // fixed according to: http://jamazon.co.uk/web/2008/03/14/jquerybrowserversion-doesnt-recognise-ie7/ $.browser.msie6 = @@ -72,12 +72,8 @@ var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/; var urlType = baseURL.toLowerCase().match(urlString); - var queryString = url.replace(/^[^\?]+\??/,''); - var params = tb_parseQuery( queryString ); - - - if((!params['TB_iframe'])){//code to show images - + if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images + TB_PrevCaption = ""; TB_PrevURL = ""; TB_PrevHTML = ""; @@ -115,10 +111,8 @@ var pagesize = tb_getPageSize(); var x = pagesize[0] - 150; var y = pagesize[1] - 150; - var imageWidth = (jQuery.browser.msie) ? parseInt(params['dbWidth']) : imgPreloader.width; - var initialImageWidth = imageWidth; - var imageHeight = (jQuery.browser.msie) ? parseInt(params['dbHeight']) : imgPreloader.height; - var initialImageHeight = imageHeight; + var imageWidth = imgPreloader.width; + var imageHeight = imgPreloader.height; if (imageWidth > x) { imageHeight = imageHeight * (x / imageWidth); imageWidth = x; @@ -138,13 +132,8 @@ TB_WIDTH = imageWidth + 30; TB_HEIGHT = imageHeight + 60; - - if ((initialImageWidth > x) ||(initialImageHeight > y)) { - $("#TB_window").append("" + "
"+caption+"
" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "
close or Esc Key
"); - } else { - $("#TB_window").append(""+caption+"" + "
"+caption+"
" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "
close or Esc Key
"); - } - + $("#TB_window").append(""+caption+"" + "
"+caption+"
" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "
close or Esc Key
"); + $("#TB_closeWindowButton").click(tb_remove); if (!(TB_PrevHTML === "")) { @@ -198,6 +187,9 @@ imgPreloader.src = url; }else{//code to show html + + var queryString = url.replace(/^[^\?]+\??/,''); + var params = tb_parseQuery( queryString ); TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no paramaters were added to URL TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no paramaters were added to URL @@ -207,16 +199,11 @@ if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window urlNoQuery = url.split('TB_'); $("#TB_iframeContent").remove(); - - var resize = ""; - if(params['resizeIframe']){ - resize = "resizeIframe();" - } if(params['modal'] != "true"){//iframe no modal - $("#TB_window").append("
"+caption+"
close or Esc Key
"); + $("#TB_window").append("
"+caption+"
close or Esc Key
"); }else{//iframe modal $("#TB_overlay").unbind(); - $("#TB_window").append(""); + $("#TB_window").append(""); } }else{// not an iframe, ajax if($("#TB_window").css("display") != "block"){ @@ -337,6 +324,4 @@ if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) { return true; } -} - - +} \ No newline at end of file