r65778 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65777‎ | r65778 | r65779 >
Date:03:57, 2 May 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Follow up to r65777
Modified paths:
  • /trunk/extensions/Storyboard/api/ApiQueryStories.php (modified) (history)
  • /trunk/extensions/Storyboard/jquery/jquery.ajaxscroll.js (modified) (history)
  • /trunk/extensions/Storyboard/tags/Storyboard/storyboard.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Storyboard/jquery/jquery.ajaxscroll.js
@@ -36,7 +36,7 @@
3737 var $me = jQuery( this );
3838 var $sp;
3939 var offset = 0;
40 - var lsp = -1;
 40+ var previousScrollPos = -1;
4141
4242 $me.css( {
4343 "overflow-x": "hidden",
@@ -106,22 +106,22 @@
107107 * function if this is the case.
108108 */
109109 function handleScrolling() {
110 - var so = $me.scrollTop();
 110+ var scrollPos = $me.scrollTop();
111111
112 - if( !window.storyboardBusy && lsp != so ) {
113 - lsp = so;
 112+ if( !window.storyboardBusy && previousScrollPos != scrollPos ) {
 113+ previousScrollPos = scrollPos;
114114 var co = $me.offset().top;
115115
116116 $sp.find( '> .' + opt.emptyBatchClass ).each( function( i, obj ) {
117 - var $b = jQuery( obj );
118 - var p = $b.position().top - co;
 117+ var $batchDiv = jQuery( obj );
 118+ var p = $batchDiv.position().top - co;
119119
120120 if ( opt.lBound > p || p > opt.uBound ) {
121121 return;
122122 }
123123
124124 window.storyboardBusy = true;
125 - opt.updateBatch( $b.removeClass( opt.emptyBatchClass ) );
 125+ opt.updateBatch( $batchDiv.removeClass( opt.emptyBatchClass ) );
126126 });
127127 }
128128
Index: trunk/extensions/Storyboard/tags/Storyboard/storyboard.js
@@ -10,7 +10,7 @@
1111 $( '.storyboard' ).ajaxScroll( {
1212 updateBatch: updateStoryboard,
1313 maxOffset: 500,
14 - batchSize: 8,
 14+ batchSize: 2,
1515 batchNum: 2, // TODO: change to 1. Some issue in the ajaxscroll plugin makesit break when this is the case though.
1616 batchClass: "batch",
1717 boxClass: "storyboard-box",
@@ -24,7 +24,7 @@
2525 'action': 'query',
2626 'list': 'stories',
2727 'format': 'json',
28 - 'stlimit': 8,
 28+ 'stlimit': 2,
2929 'stlanguage': window.storyboardLanguage
3030 };
3131
Index: trunk/extensions/Storyboard/api/ApiQueryStories.php
@@ -79,12 +79,10 @@
8080 $storyModified = $continueParams[0];
8181 $storyId = intval( $continueParams[1] );
8282
83 - /* FIXME
8483 $this->addWhere(
85 - "story_modified > $storyModified OR " .
 84+ "story_modified < $storyModified OR " .
8685 "(story_modified = $storyId AND story_id <= $storyModified)"
8786 );
88 - */
8987 }
9088
9189 $stories = $this->select( __METHOD__ );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r65777Finished work to make the storyboard work with modification date and id conti...jeroendedauw03:46, 2 May 2010

Status & tagging log