Index: trunk/extensions/Storyboard/jquery/jquery.ajaxscroll.js |
— | — | @@ -61,15 +61,16 @@ |
62 | 62 | } |
63 | 63 | |
64 | 64 | function _css(){ |
65 | | - $me.css({"overflow-x":"hidden","overflow-y":"auto"}); |
| 65 | + $me.css( { |
| 66 | + "overflow-x": "hidden", |
| 67 | + "overflow-y": "auto" |
| 68 | + } ); |
66 | 69 | } |
67 | 70 | |
68 | 71 | function _ab(){ |
69 | | - var os,b; |
| 72 | + var os = $me.find( '.batch:first' ).next().offset().top; |
| 73 | + var b = ( $me.height() / os + 1 ) * os; |
70 | 74 | |
71 | | - os=$me.find('.batch:first').next().offset().top; |
72 | | - b=($me.height()/os+1)*os; |
73 | | - |
74 | 75 | if ( "auto" == opt.uBound ) { |
75 | 76 | opt.uBound = b; |
76 | 77 | } |
— | — | @@ -91,8 +92,10 @@ |
92 | 93 | while( rp-- ) { |
93 | 94 | $b=jQuery( opt.batchTemplate ) |
94 | 95 | .attr({ |
95 | | - offset:offset, |
96 | | - len:opt.batchSiz |
| 96 | + offset: offset, |
| 97 | + len: opt.batchSiz, |
| 98 | + storymodified: 0, |
| 99 | + storyid: 0 |
97 | 100 | }) |
98 | 101 | .addClass( opt.batchClass + " " + opt.emptyBatchClass ); |
99 | 102 | |
— | — | @@ -124,9 +127,9 @@ |
125 | 128 | } |
126 | 129 | }; |
127 | 130 | |
128 | | - function vEnd(){ |
129 | | - if(ele.scrollTop > 0 && ele.scrollHeight-ele.scrollTop < opt.eBound){ |
130 | | - offset=batch($sp,offset,opt); |
| 131 | + function vEnd() { |
| 132 | + if( ele.scrollTop > 0 && ele.scrollHeight-ele.scrollTop < opt.eBound ) { |
| 133 | + offset = batch( $sp, offset, opt ); |
131 | 134 | return 1; |
132 | 135 | } |
133 | 136 | |
Index: trunk/extensions/Storyboard/tags/Storyboard/storyboard.js |
— | — | @@ -23,11 +23,11 @@ |
24 | 24 | $.getJSON( wgScriptPath + '/api.php', |
25 | 25 | { |
26 | 26 | 'action': 'query', |
27 | | - 'list': 'stories', |
28 | | - 'stcontinue': $storyboard.attr( 'offset' ) + '-0', // TODO: get modification date and id of the last story |
29 | | - 'stlimit': 4, |
30 | | - 'stlanguage': window.storyboardLanguage, |
31 | | - 'format': 'json' |
| 27 | + 'list': 'stories', |
| 28 | + 'format': 'json', |
| 29 | + 'stcontinue': $storyboard.attr( 'storymodified' ) + '-' + $storyboard.attr( 'storyid' ), |
| 30 | + 'stlimit': 8, |
| 31 | + 'stlanguage': window.storyboardLanguage |
32 | 32 | }, |
33 | 33 | function( data ) { |
34 | 34 | if ( data.query ) { |