From c4d09e4736f28efe29efef3f20b57ca02158e828 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sat, 5 Apr 2014 19:25:20 +0000 Subject: [PATCH] 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 --- src/wp-admin/js/theme.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/js/theme.js b/src/wp-admin/js/theme.js index ab6b0bee89..ac9512718c 100644 --- a/src/wp-admin/js/theme.js +++ b/src/wp-admin/js/theme.js @@ -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( '

' + l10n.error + '

' ); + $( '.theme-browser' ).find( 'div.themes' ).before( '

' + l10n.error + '

' ); }); // Create a new collection with the proper theme data