Ticket #30116: 30116.diff
File 30116.diff, 2.5 KB (added by , 10 years ago) |
---|
-
src/wp-admin/js/theme.js
763 763 764 764 this.$el.html( this.html( data ) ); 765 765 766 themes.router.navigate( themes.router.baseUrl( '?theme='+ this.model.get( 'id' ) ), { replace: true } );766 themes.router.navigate( themes.router.baseUrl( themes.router.themePath + this.model.get( 'id' ) ), { replace: true } ); 767 767 768 768 this.$el.fadeIn( 200, function() { 769 769 $( 'body' ).addClass( 'theme-installer-active full-overlay-active' ); … … 996 996 this.model = self.collection.get( id ); 997 997 998 998 // Trigger a route update for the current model 999 themes.router.navigate( themes.router.baseUrl( '?theme='+ this.model.id ) );999 themes.router.navigate( themes.router.baseUrl( themes.router.themePath + this.model.id ) ); 1000 1000 1001 1001 // Sets this.view to 'detail' 1002 1002 this.setView( 'detail' ); … … 1132 1132 1133 1133 // Update the URL hash 1134 1134 if ( event.target.value ) { 1135 themes.router.navigate( themes.router.baseUrl( '?search='+ event.target.value ), options );1135 themes.router.navigate( themes.router.baseUrl( themes.router.searchPath + event.target.value ), options ); 1136 1136 } else { 1137 1137 themes.router.navigate( themes.router.baseUrl( '' ) ); 1138 1138 } … … 1142 1142 var url = themes.router.baseUrl( '' ); 1143 1143 1144 1144 if ( event.target.value ) { 1145 url = themes.router.baseUrl( '?search='+ event.target.value );1145 url = themes.router.baseUrl( themes.router.searchPath + event.target.value ); 1146 1146 } 1147 1147 1148 1148 this.searching = false; … … 1167 1167 return 'themes.php' + url; 1168 1168 }, 1169 1169 1170 themePath: '?theme=', 1171 searchPath: '?search=', 1172 1170 1173 search: function( query ) { 1171 1174 $( '.wp-filter-search' ).val( query ); 1172 1175 }, … … 1296 1299 this.collection.query( request ); 1297 1300 1298 1301 // Set route 1299 themes.router.navigate( themes.router.baseUrl( '?search='+ value ), { replace: true } );1302 themes.router.navigate( themes.router.baseUrl( themes.router.searchPath + value ), { replace: true } ); 1300 1303 }, 300 ) 1301 1304 }); 1302 1305 … … 1395 1398 this.sort( sort ); 1396 1399 1397 1400 // Trigger a router.naviagte update 1398 themes.router.navigate( themes.router.baseUrl( '?browse='+ sort ) );1401 themes.router.navigate( themes.router.baseUrl( themes.router.browsePath + sort ) ); 1399 1402 }, 1400 1403 1401 1404 sort: function( sort ) { … … 1568 1571 return 'theme-install.php' + url; 1569 1572 }, 1570 1573 1574 themePath: '?theme=', 1575 browsePath: '?browse=', 1576 searchPath: '?search=', 1577 1571 1578 search: function( query ) { 1572 1579 $( '.wp-filter-search' ).val( query ); 1573 1580 },