mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-03 01:09:39 +01:00
c6ecb155d6
git-svn-id: http://svn.automattic.com/wordpress/trunk@10590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 line
1.1 KiB
JavaScript
1 line
1.1 KiB
JavaScript
var thickDims;jQuery(document).ready(function(a){thickDims=function(){var d=a("#TB_window"),c=a(window).height(),b=a(window).width();if(d.size()){d.width(b-90).height(c-60);a("#TB_iframeContent").width(b-90).height(c-90);d.css({"margin-left":"-"+parseInt(((b-90)/2),10)+"px"});if(typeof document.body.style.maxWidth!="undefined"){d.css({top:"30px","margin-top":"0"})}}return a("a.thickbox").each(function(){var e=a(this).attr("href");if(!e){return}e=e.replace(/&width=[0-9]+/g,"");e=e.replace(/&height=[0-9]+/g,"");a(this).attr("href",e+"&width="+(b-110)+"&height="+(c-100))})};thickDims().click(function(){var c=a(this).parents(".available-theme").find(".activatelink"),b=c.attr("href"),d=c.html();if(null==d){d=""}a("#TB_title").css({"background-color":"#222",color:"#cfcfcf"});a("#TB_closeAjaxWindow").css({"float":"left"});a("#TB_ajaxWindowTitle").css({"float":"right"}).append(' <a href="'+b+'" target="_top" class="tb-theme-preview-link">'+d+"</a>");a("#TB_iframeContent").width("100%");return false});a(window).resize(function(){thickDims()})});function tb_position(){thickDims()}; |