]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/js/customize-preview.js
WordPress 4.2
[autoinstalls/wordpress.git] / wp-includes / js / customize-preview.js
index 82f7bb862d965bce212d9899b51a7cf41206a1ea..e58c8d6d44da62e39665ecd578087760d3be5f20 100644 (file)
                        activeControls: api.settings.activeControls
                } );
 
+               // Display a loading indicator when preview is reloading, and remove on failure.
+               api.preview.bind( 'loading-initiated', function () {
+                       $( 'body' ).addClass( 'wp-customizer-unloading' );
+                       $( 'html' ).prop( 'title', api.settings.l10n.loading );
+               });
+               api.preview.bind( 'loading-failed', function () {
+                       $( 'body' ).removeClass( 'wp-customizer-unloading' );
+                       $( 'html' ).prop( 'title', '' );
+               });
+
                /* Custom Backgrounds */
                bg = $.map(['color', 'image', 'position_x', 'repeat', 'attachment'], function( prop ) {
                        return 'background_' + prop;