1 line
1.4 KiB
JavaScript
1 line
1.4 KiB
JavaScript
var tb_position;jQuery(document).ready(function(e){tb_position=function(){var t=e("#TB_window"),i=e(window).width(),n=e(window).height()-(792<i?60:20),o=792<i?772:i-20;return t.size()&&(t.width(o).height(n),e("#TB_iframeContent").width(o).height(n),t.css({"margin-left":"-"+parseInt(o/2,10)+"px"}),void 0!==document.body.style.maxWidth&&t.css({top:"30px","margin-top":"0"})),e("a.thickbox").each(function(){var t=e(this).attr("href");t&&(t=(t=t.replace(/&width=[0-9]+/g,"")).replace(/&height=[0-9]+/g,""),e(this).attr("href",t+"&width="+o+"&height="+n))})},e(window).resize(function(){tb_position()}),e(".plugin-card, .plugins .column-description").on("click","a.thickbox",function(){return tb_click.call(this),e("#TB_title").css({"background-color":"#23282d",color:"#cfcfcf"}),e("#TB_ajaxWindowTitle").html("<strong>"+plugininstallL10n.plugin_information+"</strong> "+e(this).data("title")),e("#TB_iframeContent").attr("title",plugininstallL10n.plugin_information+" "+e(this).data("title")),e("#TB_closeWindowButton").focus(),!1}),e("#plugin-information-tabs a").click(function(t){var i=e(this).attr("name");t.preventDefault(),e("#plugin-information-tabs a.current").removeClass("current"),e(this).addClass("current"),"description"!==i&&e(window).width()<772?e("#plugin-information-content").find(".fyi").hide():e("#plugin-information-content").find(".fyi").show(),e("#section-holder div.section").hide(),e("#section-"+i).show()})}); |