Widget Customizer: Restore deferral of `previewer-loading` class removal until preview is synced.

props westonruter.
fixes #27635.
Built from https://develop.svn.wordpress.org/trunk@27913


git-svn-id: http://core.svn.wordpress.org/trunk@27744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2014-04-02 19:25:15 +00:00
parent 074d31f253
commit 158597a5e3
2 changed files with 4 additions and 2 deletions

View File

@ -1285,6 +1285,9 @@ var WidgetCustomizer = ( function ($) {
control.is_widget_updating = true; // suppress triggering another updateWidget
control.setting( r.data.instance );
control.is_widget_updating = false;
} else {
// no change was made, so stop the spinner now instead of when the preview would updates
control.container.removeClass( 'previewer-loading' );
}
if ( complete_callback ) {
@ -1308,7 +1311,6 @@ var WidgetCustomizer = ( function ($) {
}
} );
jqxhr.always( function () {
control.container.removeClass( 'previewer-loading' );
control.container.removeClass( 'widget-form-loading' );
inputs.each( function () {
$( this ).removeData( 'state' + update_number );

File diff suppressed because one or more lines are too long