Ticket #33322: 33322.patch
File 33322.patch, 1.7 KB (added by , 9 years ago) |
---|
-
src/wp-admin/css/themes.css
1691 1691 background-size: 20px 20px; 1692 1692 } 1693 1693 1694 .theme-install-overlay.iframe-ready .wp-full-overlay-main { 1695 background-image: none; 1696 } 1697 1694 1698 /* =Media Queries 1695 1699 -------------------------------------------------------------- */ 1696 1700 -
src/wp-admin/js/theme.js
764 764 html: themes.template( 'theme-preview' ), 765 765 766 766 render: function() { 767 var data = this.model.toJSON(); 767 var self = this, 768 data = this.model.toJSON(); 768 769 769 this.$el. html( this.html( data ) );770 this.$el.removeClass( 'iframe-ready' ).html( this.html( data ) ); 770 771 771 772 themes.router.navigate( themes.router.baseUrl( themes.router.themePath + this.model.get( 'id' ) ), { replace: true } ); 772 773 … … 774 775 $( 'body' ).addClass( 'theme-installer-active full-overlay-active' ); 775 776 $( '.close-full-overlay' ).focus(); 776 777 }); 778 779 this.$el.find( 'iframe' ).one( 'load', function() { 780 self.iframeLoaded(); 781 }); 777 782 }, 778 783 784 iframeLoaded: function() { 785 this.$el.addClass( 'iframe-ready' ); 786 }, 787 779 788 close: function() { 780 789 this.$el.fadeOut( 200, function() { 781 790 $( 'body' ).removeClass( 'theme-installer-active full-overlay-active' ); … … 784 793 if ( themes.focusedTheme ) { 785 794 themes.focusedTheme.focus(); 786 795 } 787 }) ;796 }).removeClass( 'iframe-ready' ); 788 797 789 798 themes.router.navigate( themes.router.baseUrl( '' ) ); 790 799 this.trigger( 'preview:close' );