Theme Installer: Fix displaying of errors.

props SergeyBiryukov.
fixes #27640.

Built from https://develop.svn.wordpress.org/trunk@27958


git-svn-id: http://core.svn.wordpress.org/trunk@27788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-04-05 19:26:14 +00:00
parent a177d8bf18
commit e36c1cbf9e
2 changed files with 3 additions and 2 deletions

View File

@ -1281,8 +1281,9 @@ themes.view.Installer = themes.view.Appearance.extend({
});
this.listenTo( this.collection, 'query:fail', function() {
$( 'body' ).removeClass( 'loading-themes' );
$( '.theme-browser' ).find( 'div.error' ).remove();
$( '.theme-browser' ).append( '<div class="error"><p>' + l10n.error + '</p></div>' );
$( '.theme-browser' ).find( 'div.themes' ).before( '<div class="error"><p>' + l10n.error + '</p></div>' );
});
// Create a new collection with the proper theme data

File diff suppressed because one or more lines are too long