WordPress/wp-admin/js/theme-preview.min.js
Bot (Assets) 6e798324e9 New develop.svn.wordpress.org repository based on the old core.svn repository.
* All WordPress files move to a src/ directory.
 * New task runner (Grunt), configured to copy a built WordPress to build/.
 * svn:ignore and .gitignore for Gruntfile.js, wp-config.php, and node.js.
 * Remove Akismet external from develop.svn. Still exists in core.svn.
 * Drop minified files from src/. The build process will now generate these.

props koop.
see #24976.

and see http://wp.me/p2AvED-1AI.


Built from https://develop.svn.wordpress.org/trunk@25001


git-svn-id: http://core.svn.wordpress.org/trunk@25001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-07 05:49:02 +00:00

1 line
1.3 KiB
JavaScript

var thickDims,tbWidth,tbHeight;jQuery(document).ready(function(a){thickDims=function(){var b,c,d=a("#TB_window"),e=a(window).height(),f=a(window).width();b=tbWidth&&f-90>tbWidth?tbWidth:f-90,c=tbHeight&&e-60>tbHeight?tbHeight:e-60,d.size()&&(d.width(b).height(c),a("#TB_iframeContent").width(b).height(c-27),d.css({"margin-left":"-"+parseInt(b/2,10)+"px"}),"undefined"!=typeof document.body.style.maxWidth&&d.css({top:"30px","margin-top":"0"}))},thickDims(),a(window).resize(function(){thickDims()}),a("a.thickbox-preview").click(function(){tb_click.call(this);var b,c,d=a(this).parents(".available-theme").find(".activatelink"),e="",f=a(this).attr("href");return tbWidth=(tbWidth=f.match(/&tbWidth=[0-9]+/))?parseInt(tbWidth[0].replace(/[^0-9]+/g,""),10):a(window).width()-90,tbHeight=(tbHeight=f.match(/&tbHeight=[0-9]+/))?parseInt(tbHeight[0].replace(/[^0-9]+/g,""),10):a(window).height()-60,d.length?(b=d.attr("href")||"",c=d.attr("title")||"",e='&nbsp; <a href="'+b+'" target="_top" class="tb-theme-preview-link">'+c+"</a>"):(c=a(this).attr("title")||"",e='&nbsp; <span class="tb-theme-preview-link">'+c+"</span>"),a("#TB_title").css({"background-color":"#222",color:"#dfdfdf"}),a("#TB_closeAjaxWindow").css({"float":"left"}),a("#TB_ajaxWindowTitle").css({"float":"right"}).html(e),a("#TB_iframeContent").width("100%"),thickDims(),!1})});