Changeset 10291 for trunk/wp-admin/js/plugin-install.js
- Timestamp:
- 01/02/2009 03:08:58 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/js/plugin-install.js
r9141 r10291 1 /* Plugin Browser Thickbox related JS*/ 2 jQuery(function($) { 3 var thickDims = function() { 4 var tbWindow = $('#TB_window'); 5 var width = $(window).width(); 6 var H = $(window).height(); 7 var W = ( 720 < width ) ? 720 : width; 8 9 if ( tbWindow.size() ) { 10 tbWindow.width( W - 50 ).height( H - 45 ); 11 $('#TB_iframeContent').width( W - 50 ).height( H - 75 ); 12 tbWindow.css({'margin-left': '-' + parseInt((( W - 50 ) / 2),10) + 'px'}); 13 if ( ! ( $.browser.msie && $.browser.version.substr(0,1) < 7 ) ) 14 tbWindow.css({'top':'20px','margin-top':'0'}); 15 }; 16 17 return $('a.thickbox').each( function() { 18 var href = $(this).attr('href'); 19 if ( ! href ) 20 return; 21 href = href.replace(/&width=[0-9]+/g, ''); 22 href = href.replace(/&height=[0-9]+/g, ''); 23 $(this).attr( 'href', href + '&width=' + ( W - 80 ) + '&height=' + ( H - 85 ) ); 24 }); 25 }; 26 27 thickDims().click( function() { 28 $('#TB_title').css({'background-color':'#222','color':'#cfcfcf'}); 29 $('#TB_ajaxWindowTitle').html('<strong>' + plugininstallL10n.plugin_information + '</strong> ' + $(this).attr('title') ); 30 return false; 31 }); 32 33 $(window).resize( function() { tb_position() } ); 34 }); 35 36 /* Plugin install related JS*/ 37 jQuery(function($) { 38 $('#install-plugins tbody.plugins tr').click( function() { 39 $(this).find('.action-links a.onclick').click(); 40 return false; 41 }); 42 43 $('#plugin-information #sidemenu a').click( function() { 44 var tab = $(this).attr('name'); 45 //Flip the tab 46 $('#plugin-information-header a.current').removeClass('current'); 47 $(this).addClass('current'); 48 //Flip the content. 49 $('#section-holder div.section').hide(); //Hide 'em all 50 $('#section-' + tab).show(); 51 return false; 52 }); 53 }); 1 jQuery(document).ready(function(b){var a=function(){var f=b("#TB_window"),e=b(window).width(),d=b(window).height(),c=(720<e)?720:e;if(f.size()){f.width(c-50).height(d-45);b("#TB_iframeContent").width(c-50).height(d-75);f.css({"margin-left":"-"+parseInt(((c-50)/2),10)+"px"});if(!(b.browser.msie&&b.browser.version.substr(0,1)<7)){f.css({top:"20px","margin-top":"0"})}}return b("a.thickbox").each(function(){var g=b(this).attr("href");if(!g){return}g=g.replace(/&width=[0-9]+/g,"");g=g.replace(/&height=[0-9]+/g,"");b(this).attr("href",g+"&width="+(c-80)+"&height="+(d-85))})};a().click(function(){b("#TB_title").css({"background-color":"#222",color:"#cfcfcf"});b("#TB_ajaxWindowTitle").html("<strong>"+plugininstallL10n.plugin_information+"</strong> "+b(this).attr("title"));return false});b(window).resize(function(){tb_position()});b("#install-plugins tbody.plugins tr").click(function(){b(this).find(".action-links a.onclick").click();return false});b("#plugin-information #sidemenu a").click(function(){var c=b(this).attr("name");b("#plugin-information-header a.current").removeClass("current");b(this).addClass("current");b("#section-holder div.section").hide();b("#section-"+c).show();return false})});
Note: See TracChangeset
for help on using the changeset viewer.