r65768 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65767‎ | r65768 | r65769 >
Date:22:22, 1 May 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Follow up to r65767
Modified paths:
  • /trunk/extensions/Storyboard/jquery/jquery.ajaxscroll.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Storyboard/jquery/jquery.ajaxscroll.js
@@ -34,8 +34,9 @@
3535 var ele = this;
3636 var $me = jQuery( this );
3737 var $sp;
38 - var fnEnd,fnScroll;
39 - var offset= 0 ;
 38+ var fnEnd;
 39+ var fnScroll;
 40+ var offset = 0;
4041 var lsp = -1;
4142
4243 _css();
@@ -69,26 +70,26 @@
7071 os=$me.find('.batch:first').next().offset().top;
7172 b=($me.height()/os+1)*os;
7273
73 - if("auto"==opt.uBound){
74 - opt.uBound=b;
 74+ if ( "auto" == opt.uBound ) {
 75+ opt.uBound = b;
7576 }
7677
77 - if("auto"==opt.lBound){
78 - opt.lBound=-b;
 78+ if ( "auto" == opt.lBound ) {
 79+ opt.lBound = -b;
7980 }
8081
81 - if("auto"==opt.eBound){
82 - opt.eBound=b*2;
 82+ if ( "auto" == opt.eBound ) {
 83+ opt.eBound = b * 2;
8384 }
8485 }
8586
86 - function batch($s, offset ,opt){
 87+ function batch( $s, offset, opt ) {
8788 var $b;
8889 var i;
8990 var rp = opt.batchNum;
9091
9192 while( rp-- ) {
92 - $b=jQuery(opt.batchTemplate)
 93+ $b=jQuery( opt.batchTemplate )
9394 .attr({
9495 offset:offset,
9596 len:opt.batchSiz
@@ -107,18 +108,18 @@
108109 return offset;
109110 };
110111
111 - function vScroll(){
 112+ function vScroll() {
112113 var so = $me.scrollTop();
113114
114115 if( lsp != so){
115116 lsp = so;
116117 var co = $me.offset().top;
117118
118 - $sp.find( '> .' + opt.emptyBatchClass ).each(function( i, obj ){
119 - var $b=jQuery(obj);
120 - var p=$b.position().top-co;
121 - if(opt.lBound>p||p>opt.uBound){return;}
122 - opt.updateBatch($b.removeClass(opt.emptyBatchClass));
 119+ $sp.find( '> .' + opt.emptyBatchClass ).each( function( i, obj ) {
 120+ var $b = jQuery( obj );
 121+ var p = $b.position().top - co;
 122+ if ( opt.lBound > p || p > opt.uBound ) { return; }
 123+ opt.updateBatch( $b.removeClass( opt.emptyBatchClass ) );
123124 });
124125 }
125126 };

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r65767Stylized js a bitjeroendedauw22:12, 1 May 2010

Status & tagging log