Ticket #33322: 33322.3.patch
File 33322.3.patch, 2.5 KB (added by , 10 years ago) |
---|
-
src/wp-admin/css/themes.css
1634 1634 } 1635 1635 1636 1636 .theme-install-overlay .wp-full-overlay-main { 1637 position: relative; 1638 z-index: 0; 1639 background-color: #fff; 1640 } 1641 1642 .theme-install-overlay .wp-full-overlay-main:before { 1643 content: ''; 1644 display: block; 1645 width: 20px; 1646 height: 20px; 1647 position: absolute; 1648 left: 50%; 1649 top: 50%; 1650 z-index: -1; 1651 margin: -10px 0 0 -10px; 1652 transform: translateZ(0); 1637 1653 background: #fff url(../images/spinner.gif) no-repeat center center; 1638 1654 -webkit-background-size: 20px 20px; 1639 1655 background-size: 20px 20px; 1640 1656 } 1641 1657 1658 .theme-install-overlay.iframe-ready .wp-full-overlay-main:before { 1659 background-image: none; 1660 } 1661 1642 1662 /* =Media Queries 1643 1663 -------------------------------------------------------------- */ 1644 1664 … … 1656 1676 1657 1677 #customize-preview.wp-full-overlay-main, 1658 1678 .customize-loading #customize-container, 1659 .theme-install-overlay .wp-full-overlay-main {1679 .theme-install-overlay .wp-full-overlay-main:before { 1660 1680 background-image: url(../images/spinner-2x.gif); 1661 1681 } 1662 1682 } -
src/wp-admin/js/theme.js
766 766 html: themes.template( 'theme-preview' ), 767 767 768 768 render: function() { 769 var data = this.model.toJSON(); 769 var self = this, 770 data = this.model.toJSON(), 771 $overlay = this.$el; 770 772 771 this.$el.html( this.html( data ) );773 $overlay.removeClass( 'iframe-ready' ).html( this.html( data ) ); 772 774 773 775 themes.router.navigate( themes.router.baseUrl( themes.router.themePath + this.model.get( 'id' ) ), { replace: true } ); 774 776 775 this.$el.fadeIn( 200, function() {777 $overlay.fadeIn( 200, function() { 776 778 $( 'body' ).addClass( 'theme-installer-active full-overlay-active' ); 777 779 $( '.close-full-overlay' ).focus(); 778 780 }); 781 782 $overlay.find( 'iframe' ).one( 'load', function() { 783 self.iframeLoaded(); 784 }); 779 785 }, 780 786 787 iframeLoaded: function() { 788 this.$el.addClass( 'iframe-ready' ); 789 }, 790 781 791 close: function() { 782 792 this.$el.fadeOut( 200, function() { 783 793 $( 'body' ).removeClass( 'theme-installer-active full-overlay-active' ); … … 786 796 if ( themes.focusedTheme ) { 787 797 themes.focusedTheme.focus(); 788 798 } 789 }) ;799 }).removeClass( 'iframe-ready' ); 790 800 791 801 themes.router.navigate( themes.router.baseUrl( '' ) ); 792 802 this.trigger( 'preview:close' );