Ticket #27055: 27055.28.diff
| File 27055.28.diff, 1.6 KB (added by , 12 years ago) |
|---|
-
wp-admin/js/theme.js
229 229 self = this, 230 230 query, isPaginated, count; 231 231 232 // Store current query request args 233 // for later use with the event `theme:end` 234 this.currentQuery.request = request; 235 232 236 // Search the query cache for matches. 233 237 query = _.find( queries, function( query ) { 234 238 return _.isEqual( query.request, request ); … … 244 248 } 245 249 246 250 // Otherwise, send a new API call and add it to the cache. 247 if ( ! query ) {251 if ( ! query && ! isPaginated ) { 248 252 query = this.apiCall( request ).done( function( data ) { 249 253 // Update the collection with the queried data. 250 254 self.reset( data.themes ); … … 305 309 306 310 // Send Ajax POST request to api.wordpress.org/themes 307 311 apiCall: function( request, paginated ) { 308 // Store current query request args309 // for later use with the event `theme:end`310 this.currentQuery.request = request;311 312 312 313 // Ajax request to .org API 313 314 return $.ajax({ … … 1143 1144 request.tag = [ value.slice( 4 ) ]; 1144 1145 } 1145 1146 1147 $( '.theme-section.current' ).removeClass( 'current' ); 1148 $( 'body' ).removeClass( 'more-filters-opened filters-applied' ); 1149 1146 1150 // Get the themes by sending Ajax POST request to api.wordpress.org/themes 1147 1151 // or searching the local cache 1148 1152 this.collection.query( request ); … … 1297 1301 } 1298 1302 1299 1303 $( 'body' ).addClass( 'filters-applied' ); 1304 $( '.theme-section.current' ).removeClass( 'current' ); 1300 1305 filteringBy.empty(); 1301 1306 1302 1307 _.each( tags, function( tag ) {