Changeset 27845
- Timestamp:
- 03/29/2014 09:08:16 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/theme.js
r27843 r27845 269 269 self.add( data.themes ); 270 270 self.trigger( 'query:success' ); 271 272 // We are done loading themes for now. 273 self.loadingThemes = false; 271 274 272 275 }).fail( function() { … … 332 335 } 333 336 }); 334 } 337 }, 338 339 // Static status controller for when we are loading themes. 340 loadingThemes: false 335 341 }); 336 342 … … 1149 1155 // Bump `collection.currentQuery.page` and request more themes if we hit the end of the page. 1150 1156 this.listenTo( this, 'theme:end', function() { 1157 1158 // Make sure we are not already loading 1159 if ( self.collection.loadingThemes ) { 1160 return; 1161 } 1162 1163 // Set loadingThemes to true and bump page instance of currentQuery. 1164 self.collection.loadingThemes = true; 1151 1165 self.collection.currentQuery.page++; 1166 1167 // Use currentQuery.page to build the themes request. 1152 1168 _.extend( self.collection.currentQuery.request, { page: self.collection.currentQuery.page } ); 1153 1169 self.collection.query( self.collection.currentQuery.request );
Note: See TracChangeset
for help on using the changeset viewer.