1 /* Plugin Browser Thickbox related JS*/
2 jQuery(document).ready(function($) {
3 var thickDims = function() {
4 var tbWindow = $('#TB_window'), width = $(window).width(), H = $(window).height(), W = ( 720 < width ) ? 720 : width;
6 if ( tbWindow.size() ) {
7 tbWindow.width( W - 50 ).height( H - 45 );
8 $('#TB_iframeContent').width( W - 50 ).height( H - 75 );
9 tbWindow.css({'margin-left': '-' + parseInt((( W - 50 ) / 2),10) + 'px'});
10 if ( ! ( $.browser.msie && $.browser.version.substr(0,1) < 7 ) )
11 tbWindow.css({'top':'20px','margin-top':'0'});
14 return $('#dashboard_plugins a.thickbox, .plugins a.thickbox').each( function() {
15 var href = $(this).attr('href');
18 href = href.replace(/&width=[0-9]+/g, '');
19 href = href.replace(/&height=[0-9]+/g, '');
20 $(this).attr( 'href', href + '&width=' + ( W - 80 ) + '&height=' + ( H - 85 ) );
24 thickDims().click( function() {
27 $('#TB_title').css({'background-color':'#222','color':'#cfcfcf'});
28 $('#TB_ajaxWindowTitle').html('<strong>' + plugininstallL10n.plugin_information + '</strong> ' + $(this).attr('title') );
32 /* Plugin install related JS*/
33 $('#plugin-information #sidemenu a').click( function() {
34 var tab = $(this).attr('name');
36 $('#plugin-information-header a.current').removeClass('current');
37 $(this).addClass('current');
39 $('#section-holder div.section').hide(); //Hide 'em all
40 $('#section-' + tab).show();
44 $('#install-plugins .action-links .install-now').click( function() {
45 return confirm( plugininstallL10n.ays );