WordPress/wp-admin/js/plugin-install.min.js

2 lines
2.3 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
jQuery(document).ready(function(a){var o,i,n,e,l,d=a(),s=a(".upload-view-toggle"),t=a(".wrap"),r=a(document.body);function c(){var t;n=a(":tabbable",i),e=o.find("#TB_closeWindowButton"),l=n.last(),(t=e.add(l)).off("keydown.wp-plugin-details"),t.on("keydown.wp-plugin-details",function(t){9===(t=t).which&&(l[0]!==t.target||t.shiftKey?e[0]===t.target&&t.shiftKey&&(t.preventDefault(),l.focus()):(t.preventDefault(),e.focus()))})}window.tb_position=function(){var t=a(window).width(),i=a(window).height()-(792<t?60:20),n=792<t?772:t-20;return(o=a("#TB_window")).length&&(o.width(n).height(i),a("#TB_iframeContent").width(n).height(i),o.css({"margin-left":"-"+parseInt(n/2,10)+"px"}),void 0!==document.body.style.maxWidth&&o.css({top:"30px","margin-top":"0"})),a("a.thickbox").each(function(){var t=a(this).attr("href");t&&(t=(t=t.replace(/&width=[0-9]+/g,"")).replace(/&height=[0-9]+/g,""),a(this).attr("href",t+"&width="+n+"&height="+i))})},a(window).resize(function(){tb_position()}),r.on("thickbox:iframe:loaded",o,function(){var t;o.hasClass("plugin-details-modal")&&(t=o.find("#TB_iframeContent"),i=t.contents().find("body"),c(),e.focus(),a("#plugin-information-tabs a",i).on("click",function(){c()}),i.on("keydown",function(t){27===t.which&&tb_remove()}))}).on("thickbox:removed",function(){d.focus()}),a(".wrap").on("click",".thickbox.open-plugin-details-modal",function(t){var i=a(this).data("title")?plugininstallL10n.plugin_information+" "+a(this).data("title"):plugininstallL10n.plugin_modal_label;t.preventDefault(),t.stopPropagation(),d=a(this),tb_click.call(this),o.attr({role:"dialog","aria-label":plugininstallL10n.plugin_modal_label}).addClass("plugin-details-modal"),o.find("#TB_iframeContent").attr("title",i)}),a("#plugin-information-tabs a").click(function(t){var i=a(this).attr("name");t.preventDefault(),a("#plugin-information-tabs a.current").removeClass("current"),a(this).addClass("current"),"description"!==i&&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-"+i).show()}),t.hasClass("plugin-install-tab-upload")||s.attr({role:"button","aria-expanded":"false"}).on("click",function(t){t.preventDefault(),r.toggleClass("show-upload-view"),s.attr("aria-expanded",r.hasClass("show-upload-view"))})});