mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-06 10:50:56 +01:00
093772f3c0
* Scroll all content, rather than the dual-pane scrolling awkwardness. * Better align the header image and title overlay with the display on WordPress.org, at least at full-width. * Move the close button outside of the modal itself, rather than overlay on top of colors we can't predict. props stephdau, tellyworth, helen. fixes #27440. Built from https://develop.svn.wordpress.org/trunk@29474 git-svn-id: http://core.svn.wordpress.org/trunk@29252 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 line
1.3 KiB
JavaScript
1 line
1.3 KiB
JavaScript
var tb_position;jQuery(document).ready(function(a){tb_position=function(){var b=a("#TB_window"),c=a(window).width(),d=a(window).height()-(c>792?60:20),e=c>792?772:c-20;return b.size()&&(b.width(e).height(d),a("#TB_iframeContent").width(e).height(d),b.css({"margin-left":"-"+parseInt(e/2,10)+"px"}),"undefined"!=typeof document.body.style.maxWidth&&b.css({top:"30px","margin-top":"0"})),a("a.thickbox").each(function(){var b=a(this).attr("href");b&&(b=b.replace(/&width=[0-9]+/g,""),b=b.replace(/&height=[0-9]+/g,""),a(this).attr("href",b+"&width="+e+"&height="+d))})},a(window).resize(function(){tb_position()}),a(".plugin-card").on("click","a.thickbox",function(){return tb_click.call(this),a("#TB_title").css({"background-color":"#222",color:"#cfcfcf"}),a("#TB_ajaxWindowTitle").html("<strong>"+plugininstallL10n.plugin_information+"</strong> "+a(this).data("title")),!1}),a("#plugin-information-tabs a").click(function(b){var c=a(this).attr("name");b.preventDefault(),a("#plugin-information-tabs a.current").removeClass("current"),a(this).addClass("current"),"description"!==c&&a(window).width()<772?a("#plugin-information-content").find(".fyi").hide():a("#plugin-information-content").find(".fyi").show(),a("#section-holder div.section").hide(),a("#section-"+c).show()}),a("a.install-now").click(function(){return confirm(plugininstallL10n.ays)})}); |