http://www.mediawiki.org/wiki/Special:Code/MediaWiki/65768
Revision: 65768 Author: jeroendedauw Date: 2010-05-01 22:22:23 +0000 (Sat, 01 May 2010) Log Message: ----------- Follow up to r65767 Modified Paths: -------------- trunk/extensions/Storyboard/jquery/jquery.ajaxscroll.js Modified: trunk/extensions/Storyboard/jquery/jquery.ajaxscroll.js =================================================================== --- trunk/extensions/Storyboard/jquery/jquery.ajaxscroll.js 2010-05-01 22:12:10 UTC (rev 65767) +++ trunk/extensions/Storyboard/jquery/jquery.ajaxscroll.js 2010-05-01 22:22:23 UTC (rev 65768) @@ -34,8 +34,9 @@ var ele = this; var $me = jQuery( this ); var $sp; - var fnEnd,fnScroll; - var offset= 0 ; + var fnEnd; + var fnScroll; + var offset = 0; var lsp = -1; _css(); @@ -69,26 +70,26 @@ os=$me.find('.batch:first').next().offset().top; b=($me.height()/os+1)*os; - if("auto"==opt.uBound){ - opt.uBound=b; + if ( "auto" == opt.uBound ) { + opt.uBound = b; } - if("auto"==opt.lBound){ - opt.lBound=-b; + if ( "auto" == opt.lBound ) { + opt.lBound = -b; } - if("auto"==opt.eBound){ - opt.eBound=b*2; + if ( "auto" == opt.eBound ) { + opt.eBound = b * 2; } } - function batch($s, offset ,opt){ + function batch( $s, offset, opt ) { var $b; var i; var rp = opt.batchNum; while( rp-- ) { - $b=jQuery(opt.batchTemplate) + $b=jQuery( opt.batchTemplate ) .attr({ offset:offset, len:opt.batchSiz @@ -107,18 +108,18 @@ return offset; }; - function vScroll(){ + function vScroll() { var so = $me.scrollTop(); if( lsp != so){ lsp = so; var co = $me.offset().top; - $sp.find( '> .' + opt.emptyBatchClass ).each(function( i, obj ){ - var $b=jQuery(obj); - var p=$b.position().top-co; - if(opt.lBound>p||p>opt.uBound){return;} - opt.updateBatch($b.removeClass(opt.emptyBatchClass)); + $sp.find( '> .' + opt.emptyBatchClass ).each( function( i, obj ) { + var $b = jQuery( obj ); + var p = $b.position().top - co; + if ( opt.lBound > p || p > opt.uBound ) { return; } + opt.updateBatch( $b.removeClass( opt.emptyBatchClass ) ); }); } }; _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs