Ticket #33228: 33228.3.patch
File 33228.3.patch, 4.7 KB (added by , 10 years ago) |
---|
-
src/wp-admin/css/themes.css
1280 1280 1281 1281 body.full-overlay-active { 1282 1282 overflow: hidden; 1283 visibility: hidden; /* hide content and make it not focusable */ 1283 1284 } 1284 1285 1285 1286 .wp-full-overlay { … … 1585 1586 height: 100%; 1586 1587 } 1587 1588 1588 .customize-active #customize-container { 1589 display: block; 1589 /* Make the Customizer and Theme installer overlays the only focusable content */ 1590 #customize-container, 1591 .theme-install-overlay { 1592 visibility: visible; 1590 1593 } 1591 1594 1592 1595 .customize-loading #customize-container iframe { … … 1685 1688 border-bottom: 1px solid #ddd; 1686 1689 } 1687 1690 1688 .theme- install-overlay.wp-full-overlay-main {1691 .theme-preview-loading .wp-full-overlay-main { 1689 1692 background: #fff url(../images/spinner.gif) no-repeat center center; 1690 1693 -webkit-background-size: 20px 20px; 1691 1694 background-size: 20px 20px; -
src/wp-admin/js/customize-controls.js
3041 3041 return; 3042 3042 } 3043 3043 3044 var parent, topFocus,3044 var parent, 3045 3045 body = $( document.body ), 3046 3046 overlay = body.children( '.wp-full-overlay' ), 3047 3047 title = $( '#customize-info .panel-title.site-title' ), … … 3555 3555 3556 3556 api.trigger( 'ready' ); 3557 3557 3558 // Make sure left column gets focus3559 topFocus = closeBtn;3560 topFocus.focus();3561 setTimeout(function () {3562 topFocus.focus();3563 }, 200);3564 3565 3558 }); 3566 3559 3567 3560 })( wp, jQuery ); -
src/wp-admin/js/theme.js
720 720 nextTheme: function() { 721 721 var self = this; 722 722 self.trigger( 'theme:next', self.model.cid ); 723 $( document.body ).addClass( 'theme-preview-loading' ) 723 724 return false; 724 725 }, 725 726 … … 726 727 previousTheme: function() { 727 728 var self = this; 728 729 self.trigger( 'theme:previous', self.model.cid ); 730 $( document.body ).addClass( 'theme-preview-loading' ) 729 731 return false; 730 732 }, 731 733 … … 764 766 html: themes.template( 'theme-preview' ), 765 767 766 768 render: function() { 767 var data = this.model.toJSON(); 769 var data = this.model.toJSON(), 770 $body = $( document.body ); 768 771 772 $body.addClass( 'theme-preview-loading' ).attr( 'aria-busy', 'true' ); 773 769 774 this.$el.html( this.html( data ) ); 770 775 776 this.iframe = this.$el.find( '.wp-full-overlay-main iframe' ); 777 this.iframe.one( 'load', this.loaded ); 778 771 779 themes.router.navigate( themes.router.baseUrl( themes.router.themePath + this.model.get( 'id' ) ), { replace: true } ); 772 780 773 781 this.$el.fadeIn( 200, function() { 774 $( 'body' ).addClass( 'theme-installer-active full-overlay-active' ); 775 $( '.close-full-overlay' ).focus(); 782 $body.addClass( 'theme-installer-active full-overlay-active' ); 776 783 }); 777 784 }, 778 785 786 /** 787 * Callback for the `load` event on the Theme installer iframe. 788 */ 789 loaded: function() { 790 $( document.body ).removeClass( 'theme-preview-loading' ).attr( 'aria-busy', 'false' ); 791 }, 792 779 793 close: function() { 780 794 this.$el.fadeOut( 200, function() { 781 795 $( 'body' ).removeClass( 'theme-installer-active full-overlay-active' ); -
src/wp-includes/js/customize-loader.js
181 181 * Callback after the Customizer has been opened. 182 182 */ 183 183 opened: function() { 184 Loader.body.addClass( 'customize-active full-overlay-active' ) ;184 Loader.body.addClass( 'customize-active full-overlay-active' ).attr( 'aria-busy', 'true' ); 185 185 }, 186 186 187 187 /** … … 207 207 if ( this.originalDocumentTitle ) { 208 208 document.title = this.originalDocumentTitle; 209 209 } 210 211 // Return focus to link that was originally clicked.212 if ( this.link ) {213 this.link.focus();214 }215 210 }, 216 211 217 212 /** … … 225 220 Loader.saved = null; 226 221 Loader.body.removeClass( 'customize-active full-overlay-active' ).removeClass( 'customize-loading' ); 227 222 $( window ).off( 'beforeunload', Loader.beforeunload ); 223 // Return focus to link that was originally clicked after visibility is restored. 224 if ( Loader.link ) { 225 Loader.link.focus(); 226 } 228 227 }, 229 228 230 229 /** … … 231 230 * Callback for the `load` event on the Customizer iframe. 232 231 */ 233 232 loaded: function() { 234 Loader.body.removeClass( 'customize-loading');233 Loader.body.removeClass( 'customize-loading' ).attr( 'aria-busy', 'false' ); 235 234 }, 236 235 237 236 /**