Make WordPress Core

Ticket #33322: 33322.patch

File 33322.patch, 1.7 KB (added by afercia, 9 years ago)
  • src/wp-admin/css/themes.css

     
    16911691        background-size: 20px 20px;
    16921692}
    16931693
     1694.theme-install-overlay.iframe-ready .wp-full-overlay-main {
     1695        background-image: none;
     1696}
     1697
    16941698/* =Media Queries
    16951699-------------------------------------------------------------- */
    16961700
  • src/wp-admin/js/theme.js

     
    764764        html: themes.template( 'theme-preview' ),
    765765
    766766        render: function() {
    767                 var data = this.model.toJSON();
     767                var self = this,
     768                        data = this.model.toJSON();
    768769
    769                 this.$el.html( this.html( data ) );
     770                this.$el.removeClass( 'iframe-ready' ).html( this.html( data ) );
    770771
    771772                themes.router.navigate( themes.router.baseUrl( themes.router.themePath + this.model.get( 'id' ) ), { replace: true } );
    772773
     
    774775                        $( 'body' ).addClass( 'theme-installer-active full-overlay-active' );
    775776                        $( '.close-full-overlay' ).focus();
    776777                });
     778
     779                this.$el.find( 'iframe' ).one( 'load', function() {
     780                        self.iframeLoaded();
     781                });
    777782        },
    778783
     784        iframeLoaded: function() {
     785                this.$el.addClass( 'iframe-ready' );
     786        },
     787
    779788        close: function() {
    780789                this.$el.fadeOut( 200, function() {
    781790                        $( 'body' ).removeClass( 'theme-installer-active full-overlay-active' );
     
    784793                        if ( themes.focusedTheme ) {
    785794                                themes.focusedTheme.focus();
    786795                        }
    787                 });
     796                }).removeClass( 'iframe-ready' );
    788797
    789798                themes.router.navigate( themes.router.baseUrl( '' ) );
    790799                this.trigger( 'preview:close' );