|
|
|
|
@ -12,6 +12,8 @@ var src=src[src.length-1].getAttribute('src'); |
|
|
|
|
var src=src.substr(0,src.length-30); |
|
|
|
|
var tb_pathToImage = src+"img/loadingAnimation.gif"; |
|
|
|
|
|
|
|
|
|
var close_image = src+"img/close.png"; |
|
|
|
|
|
|
|
|
|
/*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/ |
|
|
|
|
|
|
|
|
|
//on page load call tb_init
|
|
|
|
|
@ -39,8 +41,8 @@ function tb_init(domChunk){ |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
$("body","html").css({height: "100%", width: "100%"}); |
|
|
|
|
@ -136,7 +138,11 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic |
|
|
|
|
|
|
|
|
|
TB_WIDTH = imageWidth + 30; |
|
|
|
|
TB_HEIGHT = imageHeight + 60; |
|
|
|
|
$("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>X</a> / Esc</div>"); |
|
|
|
|
$("#TB_window").append("<div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton'><img src='"+close_image+"'/></a></div>"); |
|
|
|
|
|
|
|
|
|
$("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>");
|
|
|
|
|
$("#TB_window").append("<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div>") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#TB_closeWindowButton").click(tb_remove); |
|
|
|
|
|
|
|
|
|
@ -204,15 +210,15 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic |
|
|
|
|
urlNoQuery = url.split('TB_'); |
|
|
|
|
$("#TB_iframeContent").remove(); |
|
|
|
|
if(params['modal'] != "true"){//iframe no modal
|
|
|
|
|
$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'>X</a> / Esc</div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' > </iframe>"); |
|
|
|
|
$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'><img src='"+close_image+"'/></a></a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' > </iframe>"); |
|
|
|
|
}else{//iframe modal
|
|
|
|
|
$("#TB_overlay").unbind(); |
|
|
|
|
$("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'> </iframe>"); |
|
|
|
|
} |
|
|
|
|
}else{// not an iframe, ajax
|
|
|
|
|
} else {// not an iframe, ajax
|
|
|
|
|
if($("#TB_window").css("display") != "block"){ |
|
|
|
|
if(params['modal'] != "true"){//ajax no modal
|
|
|
|
|
$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>X</a> / Esc</div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>"); |
|
|
|
|
$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'><img src='"+close_image+"'/></a></a></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>"); |
|
|
|
|
}else{//ajax modal
|
|
|
|
|
$("#TB_overlay").unbind(); |
|
|
|
|
$("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>"); |
|
|
|
|
|