r61565 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61564‎ | r61565 | r61566 >
Date:07:52, 27 January 2010
Author:werdna
Status:ok
Tags:
Comment:
Merge r61563 to LiquidThreads test deployments
Modified paths:
  • /branches/wmf-deployment/extensions/LiquidThreads_alpha (modified) (history)
  • /branches/wmf-deployment/extensions/LiquidThreads_alpha/jquery/js2.combined.js (modified) (history)
  • /branches/wmf-deployment/extensions/LiquidThreads_alpha/lqt.js (modified) (history)

Diff [purge]

Property changes on: branches/wmf-deployment/extensions/LiquidThreads_alpha/jquery/js2.combined.js
___________________________________________________________________
Name: svn:mergeinfo
11 - /trunk/extensions/LiquidThreads/jquery/js2.combined.js:57390,59879,59883,59885-60124
22 + /trunk/extensions/LiquidThreads/jquery/js2.combined.js:57390,59879,59883,59885-60124,61563
Index: branches/wmf-deployment/extensions/LiquidThreads_alpha/lqt.js
@@ -647,20 +647,34 @@
648648
649649 // Update thread-level menu, if appropriate
650650 if ( $j(threadWrapper).hasClass( 'lqt-thread-topmost' ) ) {
 651+ // To perform better, check the 3 elements before the top-level thread container before
 652+ // scanning the whole document
 653+ var menu = undefined;
651654 var threadLevelCommandSelector = '#lqt-threadlevel-commands-'+threadId;
 655+ var traverseElement = $j(threadWrapper);
652656
653 - var menu = $j(threadLevelCommandSelector);
 657+ for( i=0;i<3 && typeof menu == 'undefined';++i ) {
 658+ traverseElement = traverseElement.prev();
 659+ if ( traverseElement.is(threadLevelCommandSelector) ) {
 660+ menu = traverseElement
 661+ }
 662+ }
 663+
 664+ if ( typeof menu == 'undefined' ) {
 665+ menu = $j(threadLevelCommandSelector);
 666+ }
 667+
654668 liquidThreads.setupThreadMenu( menu, threadId );
655669 }
656670
657671 // Check for a "show replies" button
658 - $j('a.lqt-show-replies').click( liquidThreads.showReplies );
 672+ $j(threadContainer).find('a.lqt-show-replies').click( liquidThreads.showReplies );
659673
660674 // "Show more posts" link
661 - $j('a.lqt-show-more-posts').click( liquidThreads.showMore );
 675+ $j(threadContainer).find('a.lqt-show-more-posts').click( liquidThreads.showMore );
662676
663677 // Handler for "Link to this" button
664 - $j('.lqt-command-link').click( liquidThreads.showLinkWindow );
 678+ $j(threadContainer).find('.lqt-command-link').click( liquidThreads.showLinkWindow );
665679 },
666680
667681 'showReplies' : function(e) {
Property changes on: branches/wmf-deployment/extensions/LiquidThreads_alpha
___________________________________________________________________
Name: svn:mergeinfo
668682 - /trunk/extensions/LiquidThreads:57390,58990-59196,59198-59661,59666-59743,59782-59877,59879,59883,59885-60124
669683 + /trunk/extensions/LiquidThreads:57390,58990-59196,59198-59661,59666-59743,59782-59877,59879,59883,59885-60124,61563

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r61563LiquidThreads: replace some inefficient direct Sizzler ($j(selector)) calls w...werdna07:45, 27 January 2010

Status & tagging log