Changeset 39099
- Timestamp:
- 11/02/2016 10:46:25 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/updates.js
r38827 r39099 2246 2246 $pluginSearch.on( 'keyup input', _.debounce( function( event ) { 2247 2247 var data = { 2248 _ajax_nonce: wp.updates.ajaxNonce, 2249 s: event.target.value, 2250 pagenow: pagenow 2251 }; 2248 _ajax_nonce: wp.updates.ajaxNonce, 2249 s: event.target.value, 2250 pagenow: pagenow, 2251 plugin_status: 'all' 2252 }, 2253 queryArgs; 2252 2254 2253 2255 // Clear on escape. … … 2262 2264 } 2263 2265 2266 queryArgs = _.object( _.compact( _.map( location.search.slice( 1 ).split( '&' ), function( item ) { 2267 if ( item ) return item.split( '=' ); 2268 } ) ) ); 2269 2270 data.plugin_status = queryArgs.plugin_status || 'all'; 2271 2264 2272 if ( window.history && window.history.replaceState ) { 2265 window.history.replaceState( null, '', location.href.split( '?' )[ 0 ] + '?s=' + data.s );2273 window.history.replaceState( null, '', location.href.split( '?' )[ 0 ] + '?s=' + data.s + '&plugin_status=' + data.plugin_status ); 2266 2274 } 2267 2275 … … 2272 2280 $bulkActionForm.empty(); 2273 2281 $( 'body' ).addClass( 'loading-content' ); 2282 $( '.subsubsub .current' ).removeClass( 'current' ); 2274 2283 2275 2284 wp.updates.searchRequest = wp.ajax.post( 'search-plugins', data ).done( function( response ) { … … 2281 2290 if ( ! data.s.length ) { 2282 2291 $oldSubTitle.remove(); 2292 $( '.subsubsub .' + data.plugin_status + ' a' ).addClass( 'current' ); 2283 2293 } else if ( $oldSubTitle.length ) { 2284 2294 $oldSubTitle.replaceWith( $subTitle );
Note: See TracChangeset
for help on using the changeset viewer.