/** * Theme Browsing * * Controls visibility of theme details on manage and install themes pages. */ jQuery( function($) { $('#availablethemes').on( 'click', '.theme-detail', function (event) { $(this).parents('.action-links').siblings('.themedetaildiv').toggle(); event.preventDefault(); }); }); /** * Theme Install * * Displays theme previews on theme install pages. */ jQuery( function($) { var preview = $('#theme-installer'), info = preview.find('.install-theme-info'), panel = preview.find('.wp-full-overlay-main'), body = $( document.body ); preview.on( 'click', '.close-full-overlay', function( event ) { preview.fadeOut( 200, function() { panel.empty(); body.removeClass('theme-installer-active full-overlay-active'); }); event.preventDefault(); }); preview.on( 'click', '.collapse-sidebar', function( event ) { preview.toggleClass('collapsed'); event.preventDefault(); }); $('#availablethemes').on( 'click', '.installable-theme', function( event ) { var src; info.html( $(this).find('.install-theme-info').html() ); src = info.find( '.theme-preview-url' ).val(); panel.html( '