r66165 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66164‎ | r66165 | r66166 >
Date:21:59, 10 May 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Follow up to r66163
Modified paths:
  • /trunk/extensions/Storyboard/jquery/jquery.ajaxscroll.js (modified) (history)
  • /trunk/extensions/Storyboard/storyboard.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Storyboard/jquery/jquery.ajaxscroll.js
@@ -27,7 +27,7 @@
2828 endDelay: 100,
2929 updateBatch: null,
3030 updateEnd: null,
31 - loaded: false,
 31+ loaded: true,
3232 continueParam: ''
3333 },
3434 opt
Index: trunk/extensions/Storyboard/storyboard.js
@@ -138,7 +138,7 @@
139139 *
140140 * @param $storyboard
141141 */
142 -function stbUpdateReviewBoard( $storyboard ) {
 142+function stbUpdateReviewBoard( ajaxscrollObj, $storyboard ) {
143143 requestArgs = {
144144 'action': 'query',
145145 'list': 'stories',
@@ -149,11 +149,15 @@
150150 'ststate': window.reviewstate
151151 };
152152
 153+ if ( ajaxscrollObj.continueParam ) {
 154+ requestArgs.stcontinue = ajaxscrollObj.continueParam;
 155+ }
 156+
153157 jQuery.getJSON( wgScriptPath + '/api.php',
154158 requestArgs,
155159 function( data ) {
156160 if ( data.query ) {
157 - stbAddStories( $storyboard, data.query );
 161+ stbAddStories( ajaxscrollObj, $storyboard, data.query );
158162 } else {
159163 alert( stbMsgExt( 'storyboard-anerroroccured', [data.error.info] ) );
160164 }
@@ -167,7 +171,7 @@
168172 * @param $storyboard
169173 * @param query
170174 */
171 -function stbAddStories( $storyboard, query ) {
 175+function stbAddStories( ajaxscrollObj, $storyboard, query ) {
172176 // Remove the empty boxes.
173177 $storyboard.html( '' );
174178
@@ -271,7 +275,10 @@
272276
273277 $storyBody.append( controlDiv );
274278
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;
276283 }
277284 }
278285

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r66163Non-working JS changejeroendedauw21:18, 10 May 2010

Status & tagging log