Changeset 1311
- Timestamp:
- 02/25/2015 12:16:05 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/js/theme.js
r1299 r1311 580 580 581 581 _.extend( wp.themes.view.InstallerSearch.prototype, { 582 events: { 583 'keyup': 'search', 584 'search': 'search', 585 }, 586 582 587 doSearch: _.debounce( function( value ) { 583 var request = {}, 584 sort = 'featured'; 588 var request = {}; 585 589 586 590 request.search = value; … … 607 611 $( 'body' ).removeClass( 'show-filters filters-applied' ); 608 612 609 // Get the themes by sending Ajax POST request to api.wordpress.org/themes610 // or searching the local cache611 this.collection.query( request );612 613 // Set route614 613 if ( value ) { 614 // Get the themes by sending Ajax POST request to api.wordpress.org/themes 615 // or searching the local cache 616 this.collection.query( request ); 617 618 // Set route 615 619 wp.themes.utils.title( value ); 616 620 wp.themes.router.navigate( wp.themes.router.baseUrl( wp.themes.router.searchPath + value ), { replace: true } ); 617 621 } else { 618 wp.themes.router.navigate( wp.themes.router.baseUrl( wp.themes.router.browsePath + sort ) ); 619 this.parent.sort( sort ); 622 wp.themes.router.navigate( wp.themes.router.baseUrl( wp.themes.router.browsePath + 'featured' ), { trigger: true } ); 620 623 } 621 624 }, 300 )
Note: See TracChangeset
for help on using the changeset viewer.