Ticket #27055: 27055.29.diff
| File 27055.29.diff, 3.4 KB (added by , 12 years ago) |
|---|
-
wp-admin/css/themes.css
1288 1288 margin: 0 5px; 1289 1289 padding: 4px 8px; 1290 1290 } 1291 .more-filters-container .filtering-by a { 1292 margin-left: 10px; 1293 } 1291 1294 body.filters-applied .more-filters-container .filters-group, 1292 body.filters-applied .more-filters-container a ,1295 body.filters-applied .more-filters-container a.button, 1293 1296 body.filters-applied .more-filters-container br { 1294 1297 display: none !important; 1295 1298 } -
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 ); … … 1161 1165 'click .apply-filters': 'addFilter', 1162 1166 'click [type="checkbox"]': 'filtersChecked', 1163 1167 'click .clear-filters': 'clearFilters', 1164 'click .feature-name': 'filterSection' 1168 'click .feature-name': 'filterSection', 1169 'click .filtering-by a': 'backToFilters' 1165 1170 }, 1166 1171 1167 1172 // Handles all the rendering of the public theme directory … … 1297 1302 } 1298 1303 1299 1304 $( 'body' ).addClass( 'filters-applied' ); 1305 $( '.theme-section.current' ).removeClass( 'current' ); 1300 1306 filteringBy.empty(); 1301 1307 1302 1308 _.each( tags, function( tag ) { … … 1355 1361 event.preventDefault(); 1356 1362 1357 1363 if ( $( 'body' ).hasClass( 'filters-applied' ) ) { 1358 return $( 'body' ).removeClass( 'filters-applied');1364 return this.backToFilters(); 1359 1365 } 1360 1366 1361 1367 // If the filters section is opened and filters are checked … … 1384 1390 $( item ).prop( 'checked', false ); 1385 1391 return self.filtersChecked(); 1386 1392 }); 1393 }, 1394 1395 backToFilters: function() { 1396 $( 'body' ).removeClass( 'filters-applied' ); 1387 1397 } 1388 1398 }); 1389 1399 -
wp-admin/theme-install.php
145 145 <div class="filtering-by"> 146 146 <span><?php _e( 'Filtering by:' ); ?></span> 147 147 <div class="tags"></div> 148 <a href="#"><?php _e( 'Edit' ); ?></a> 148 149 </div> 149 150 </div> 150 151 </div>