diff --git src/wp-admin/css/themes.css src/wp-admin/css/themes.css
index 565f2fa..fc39880 100644
|
|
body.full-overlay-active { |
1357 | 1357 | height: 100%; |
1358 | 1358 | } |
1359 | 1359 | |
| 1360 | #customize-preview.wp-full-overlay-main { |
| 1361 | background: url(../images/spinner.gif) no-repeat; |
| 1362 | -webkit-background-size: 20px 20px; |
| 1363 | background-size: 20px 20px; |
| 1364 | background-position: center center; |
| 1365 | } |
| 1366 | |
1360 | 1367 | .wp-full-overlay-sidebar .wp-full-overlay-header { |
1361 | 1368 | position: absolute; |
1362 | 1369 | left: 0; |
diff --git src/wp-admin/js/customize-controls.js src/wp-admin/js/customize-controls.js
index 7c4a631..c85af04 100644
|
|
|
1769 | 1769 | refresh: function() { |
1770 | 1770 | var self = this; |
1771 | 1771 | |
| 1772 | // Display loading indicator |
| 1773 | this.send( 'loading-initiated' ); |
| 1774 | |
1772 | 1775 | this.abort(); |
1773 | 1776 | |
1774 | 1777 | this.loading = new api.PreviewFrame({ |
… |
… |
|
1801 | 1804 | }); |
1802 | 1805 | |
1803 | 1806 | this.loading.fail( function( reason, location ) { |
1804 | | if ( 'redirect' === reason && location ) |
| 1807 | self.send( 'loading-failed' ); |
| 1808 | if ( 'redirect' === reason && location ) { |
1805 | 1809 | self.previewUrl( location ); |
| 1810 | } |
1806 | 1811 | |
1807 | 1812 | if ( 'logged out' === reason ) { |
1808 | 1813 | if ( self.preview ) { |
… |
… |
|
1813 | 1818 | self.login().done( self.refresh ); |
1814 | 1819 | } |
1815 | 1820 | |
1816 | | if ( 'cheatin' === reason ) |
| 1821 | if ( 'cheatin' === reason ) { |
1817 | 1822 | self.cheatin(); |
| 1823 | } |
1818 | 1824 | }); |
1819 | 1825 | }, |
1820 | 1826 | |
diff --git src/wp-includes/class-wp-customize-manager.php src/wp-includes/class-wp-customize-manager.php
index b695271..b25b48a 100644
|
|
final class WP_Customize_Manager { |
432 | 432 | add_action( 'wp', array( $this, 'customize_preview_override_404_status' ) ); |
433 | 433 | add_action( 'wp_head', array( $this, 'customize_preview_base' ) ); |
434 | 434 | add_action( 'wp_head', array( $this, 'customize_preview_html5' ) ); |
| 435 | add_action( 'wp_head', array( $this, 'customize_preview_loading_style' ) ); |
435 | 436 | add_action( 'wp_footer', array( $this, 'customize_preview_settings' ), 20 ); |
436 | 437 | add_action( 'shutdown', array( $this, 'customize_preview_signature' ), 1000 ); |
437 | 438 | add_filter( 'wp_die_handler', array( $this, 'remove_preview_signature' ) ); |
… |
… |
final class WP_Customize_Manager { |
491 | 492 | <![endif]--><?php |
492 | 493 | } |
493 | 494 | |
| 495 | public function customize_preview_loading_style() { |
| 496 | ?><style> |
| 497 | body.wp-customizer-unloading { |
| 498 | opacity: 0.25; |
| 499 | cursor: progress !important; |
| 500 | -webkit-transition: opacity 0.5s; |
| 501 | transition: opacity 0.5s; |
| 502 | } |
| 503 | body.wp-customizer-unloading * { |
| 504 | pointer-events: none !important; |
| 505 | } |
| 506 | </style><?php |
| 507 | } |
| 508 | |
494 | 509 | /** |
495 | 510 | * Print JavaScript settings for preview frame. |
496 | 511 | * |
… |
… |
final class WP_Customize_Manager { |
503 | 518 | 'activePanels' => array(), |
504 | 519 | 'activeSections' => array(), |
505 | 520 | 'activeControls' => array(), |
| 521 | 'l10n' => array( |
| 522 | 'loading' => __( 'Loading ...' ), |
| 523 | ), |
506 | 524 | ); |
507 | 525 | |
508 | 526 | if ( 2 == $this->nonce_tick ) { |
diff --git src/wp-includes/js/customize-preview.js src/wp-includes/js/customize-preview.js
index 82f7bb8..d02f8f9 100644
|
|
|
115 | 115 | activeControls: api.settings.activeControls |
116 | 116 | } ); |
117 | 117 | |
| 118 | // Display a loading indicator when preview is reloading, and remove on failure |
| 119 | api.preview.bind( 'loading-initiated', function () { |
| 120 | $( 'body' ).addClass( 'wp-customizer-unloading' ); |
| 121 | $( 'html' ).prop( 'title', api.settings.l10n.loading ); |
| 122 | }); |
| 123 | api.preview.bind( 'loading-failed', function () { |
| 124 | $( 'body' ).removeClass( 'wp-customizer-unloading' ); |
| 125 | $( 'html' ).prop( 'title', '' ); |
| 126 | }); |
| 127 | |
118 | 128 | /* Custom Backgrounds */ |
119 | 129 | bg = $.map(['color', 'image', 'position_x', 'repeat', 'attachment'], function( prop ) { |
120 | 130 | return 'background_' + prop; |