Changeset 20242
- Timestamp:
- 03/21/2012 08:17:47 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/js/theme.dev.js
r20140 r20242 106 106 (function($){ 107 107 ThemeScroller = { 108 nonce: '',109 nextPage: 2, // By default, assume we're on the first page.110 108 querying: false, 111 109 scrollPollingDelay: 500, … … 120 118 */ 121 119 init: function() { 122 var self = this, 123 startPage; 120 var self = this; 124 121 125 122 // Get out early if we don't have the required arguments. … … 133 130 // Handle inputs 134 131 this.nonce = $('#_ajax_fetch_list_nonce').val(); 135 136 startPage = theme_list_args.paged; 137 if ( startPage !== undefined ) 138 this.nextPage = ( startPage + 1 ); 132 this.nextPage = ( theme_list_args.paged + 1 ); 139 133 140 134 // Cache jQuery selectors … … 148 142 * when user hits the bottom of the current page 149 143 */ 150 if ( theme_list_args.total_pages !== undefined && 151 theme_list_args.total_pages >= this.nextPage ) 144 if ( theme_list_args.total_pages >= this.nextPage ) 152 145 this.pollInterval = 153 146 setInterval( function() { … … 182 175 */ 183 176 process: function( results ) { 184 if ( ( results === undefined ) || 185 ( results.rows === undefined ) || 186 ( results.rows.indexOf( 'no-items' ) != -1 ) ) { 177 if ( results === undefined ) { 187 178 clearInterval( this.pollInterval ); 188 179 return;
Note: See TracChangeset
for help on using the changeset viewer.