equal
deleted
inserted
replaced
1663 }); |
1663 }); |
1664 |
1664 |
1665 this.listenTo( this.collection, 'query:fail', function() { |
1665 this.listenTo( this.collection, 'query:fail', function() { |
1666 $( 'body' ).removeClass( 'loading-content' ); |
1666 $( 'body' ).removeClass( 'loading-content' ); |
1667 $( '.theme-browser' ).find( 'div.error' ).remove(); |
1667 $( '.theme-browser' ).find( 'div.error' ).remove(); |
1668 $( '.theme-browser' ).find( 'div.themes' ).before( '<div class="error"><p>' + l10n.error + '</p><p><button class="button try-again">' + l10n.tryAgain + '</button></p></div>' ); |
1668 $( '.theme-browser' ).find( 'div.themes' ).before( '<div class="notice notice-error"><p>' + l10n.error + '</p><p><button class="button try-again">' + l10n.tryAgain + '</button></p></div>' ); |
1669 $( '.theme-browser .error .try-again' ).on( 'click', function( e ) { |
1669 $( '.theme-browser .error .try-again' ).on( 'click', function( e ) { |
1670 e.preventDefault(); |
1670 e.preventDefault(); |
1671 $( 'input.wp-filter-search' ).trigger( 'input' ); |
1671 $( 'input.wp-filter-search' ).trigger( 'input' ); |
1672 } ); |
1672 } ); |
1673 }); |
1673 }); |