Index: trunk/extensions/Storyboard/jquery/jquery.ajaxscroll.js |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | endDelay: 100, |
29 | 29 | updateBatch: null, |
30 | 30 | updateEnd: null, |
31 | | - loaded: false, |
| 31 | + loaded: true, |
32 | 32 | continueParam: '' |
33 | 33 | }, |
34 | 34 | opt |
Index: trunk/extensions/Storyboard/storyboard.js |
— | — | @@ -138,7 +138,7 @@ |
139 | 139 | * |
140 | 140 | * @param $storyboard |
141 | 141 | */ |
142 | | -function stbUpdateReviewBoard( $storyboard ) { |
| 142 | +function stbUpdateReviewBoard( ajaxscrollObj, $storyboard ) { |
143 | 143 | requestArgs = { |
144 | 144 | 'action': 'query', |
145 | 145 | 'list': 'stories', |
— | — | @@ -149,11 +149,15 @@ |
150 | 150 | 'ststate': window.reviewstate |
151 | 151 | }; |
152 | 152 | |
| 153 | + if ( ajaxscrollObj.continueParam ) { |
| 154 | + requestArgs.stcontinue = ajaxscrollObj.continueParam; |
| 155 | + } |
| 156 | + |
153 | 157 | jQuery.getJSON( wgScriptPath + '/api.php', |
154 | 158 | requestArgs, |
155 | 159 | function( data ) { |
156 | 160 | if ( data.query ) { |
157 | | - stbAddStories( $storyboard, data.query ); |
| 161 | + stbAddStories( ajaxscrollObj, $storyboard, data.query ); |
158 | 162 | } else { |
159 | 163 | alert( stbMsgExt( 'storyboard-anerroroccured', [data.error.info] ) ); |
160 | 164 | } |
— | — | @@ -167,7 +171,7 @@ |
168 | 172 | * @param $storyboard |
169 | 173 | * @param query |
170 | 174 | */ |
171 | | -function stbAddStories( $storyboard, query ) { |
| 175 | +function stbAddStories( ajaxscrollObj, $storyboard, query ) { |
172 | 176 | // Remove the empty boxes. |
173 | 177 | $storyboard.html( '' ); |
174 | 178 | |
— | — | @@ -271,7 +275,10 @@ |
272 | 276 | |
273 | 277 | $storyBody.append( controlDiv ); |
274 | 278 | |
275 | | - $storyboard.append( $storyBody ); |
| 279 | + $storyboard.append( $storyBody ); |
| 280 | + |
| 281 | + ajaxscrollObj.continueParam = data["query-continue"] ? data["query-continue"].stories.stcontinue : false; |
| 282 | + ajaxscrollObj.loaded = true; |
276 | 283 | } |
277 | 284 | } |
278 | 285 | |