Theme Installer: Fix displaying of errors.

props SergeyBiryukov.
fixes #27640.


git-svn-id: https://develop.svn.wordpress.org/trunk@27958 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2014-04-05 19:25:20 +00:00
parent 631b55ac0b
commit c4d09e4736

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