raw
mp-wp_genesis           1 /* Plugin Browser Thickbox related JS*/
mp-wp_genesis 2 jQuery(function($) {
mp-wp_genesis 3 var thickDims = function() {
mp-wp_genesis 4 var tbWindow = $('#TB_window');
mp-wp_genesis 5 var width = $(window).width();
mp-wp_genesis 6 var H = $(window).height();
mp-wp_genesis 7 var W = ( 720 < width ) ? 720 : width;
mp-wp_genesis 8
mp-wp_genesis 9 if ( tbWindow.size() ) {
mp-wp_genesis 10 tbWindow.width( W - 50 ).height( H - 45 );
mp-wp_genesis 11 $('#TB_iframeContent').width( W - 50 ).height( H - 75 );
mp-wp_genesis 12 tbWindow.css({'margin-left': '-' + parseInt((( W - 50 ) / 2),10) + 'px'});
mp-wp_genesis 13 if ( ! ( $.browser.msie && $.browser.version.substr(0,1) < 7 ) )
mp-wp_genesis 14 tbWindow.css({'top':'20px','margin-top':'0'});
mp-wp_genesis 15 };
mp-wp_genesis 16
mp-wp_genesis 17 return $('a.thickbox').each( function() {
mp-wp_genesis 18 var href = $(this).attr('href');
mp-wp_genesis 19 if ( ! href )
mp-wp_genesis 20 return;
mp-wp_genesis 21 href = href.replace(/&width=[0-9]+/g, '');
mp-wp_genesis 22 href = href.replace(/&height=[0-9]+/g, '');
mp-wp_genesis 23 $(this).attr( 'href', href + '&width=' + ( W - 80 ) + '&height=' + ( H - 85 ) );
mp-wp_genesis 24 });
mp-wp_genesis 25 };
mp-wp_genesis 26
mp-wp_genesis 27 thickDims().click( function() {
mp-wp_genesis 28 $('#TB_title').css({'background-color':'#222','color':'#cfcfcf'});
mp-wp_genesis 29 $('#TB_ajaxWindowTitle').html('<strong>' + plugininstallL10n.plugin_information + '</strong>&nbsp;' + $(this).attr('title') );
mp-wp_genesis 30 return false;
mp-wp_genesis 31 });
mp-wp_genesis 32
mp-wp_genesis 33 $(window).resize( function() { tb_position() } );
mp-wp_genesis 34 });
mp-wp_genesis 35
mp-wp_genesis 36 /* Plugin install related JS*/
mp-wp_genesis 37 jQuery(function($) {
mp-wp_genesis 38 $('#install-plugins tbody.plugins tr').click( function() {
mp-wp_genesis 39 $(this).find('.action-links a.onclick').click();
mp-wp_genesis 40 return false;
mp-wp_genesis 41 });
mp-wp_genesis 42
mp-wp_genesis 43 $('#plugin-information #sidemenu a').click( function() {
mp-wp_genesis 44 var tab = $(this).attr('name');
mp-wp_genesis 45 //Flip the tab
mp-wp_genesis 46 $('#plugin-information-header a.current').removeClass('current');
mp-wp_genesis 47 $(this).addClass('current');
mp-wp_genesis 48 //Flip the content.
mp-wp_genesis 49 $('#section-holder div.section').hide(); //Hide 'em all
mp-wp_genesis 50 $('#section-' + tab).show();
mp-wp_genesis 51 return false;
mp-wp_genesis 52 });
mp-wp_genesis 53 });