http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88127
Revision: 88127
Author: jeroendedauw
Date: 2011-05-14 23:22:27 +0000 (Sat, 14 May 2011)
Log Message:
-----------
small tweak
Modified Paths:
--------------
trunk/extensions/Push/specials/ext.push.special.js
Modified: trunk/extensions/Push/specials/ext.push.special.js
===================================================================
--- trunk/extensions/Push/specials/ext.push.special.js 2011-05-14 23:17:43 UTC
(rev 88126)
+++ trunk/extensions/Push/specials/ext.push.special.js 2011-05-14 23:22:27 UTC
(rev 88127)
@@ -50,20 +50,23 @@
}
}
+ function appendAndScroll( item ) {
+ var box = $('#pushResultDiv');
+ var innerBox = $('#pushResultDiv > .innerResultBox');
+ var atBottom = Math.abs(innerBox.offset().top) + box.height() +
box.offset().top >= innerBox.outerHeight();
+
+ resultList.append( item );
+
+ if ( atBottom ) {
+ box.attr( {'scrollTop': box.attr( 'scrollHeight' )} );
+ }
+ }
+
function startPush( pageName, targetOffset, listItem ) {
if ( targetOffset == 0 ) {
var listItem = $( '<li />' );
listItem.text( mediaWiki.msg(
'push-special-item-pushing', pageName ) );
-
- var box = $('#pushResultDiv');
- var innerBox = $('#pushResultDiv > .innerResultBox');
- var atBottom = Math.abs(innerBox.offset().top) +
box.height() + box.offset().top >= innerBox.outerHeight();
-
- resultList.append( listItem );
-
- if ( atBottom ) {
- box.attr( {'scrollTop': box.attr(
'scrollHeight' )} );
- }
+ appendAndScroll( listItem );
}
var currentBatchLimit = Math.min( targetOffset + batchSize,
targets.length );
@@ -222,7 +225,7 @@
}
function showCompletion() {
- resultList.append( $( '<li />' ).append( $( '<b />' ).text(
mediaWiki.msg( 'push-special-push-done' ) ) ) );
+ appendAndScroll( $( '<li />' ).append( $( '<b />' ).text(
mediaWiki.msg( 'push-special-push-done' ) ) ) );
}
} ); })(jQuery);
\ No newline at end of file
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs