r61564 MediaWiki - Code Review archive

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

Diff [purge]

Property changes on: branches/wmf-deployment/extensions/LiquidThreads/jquery/js2.combined.js
___________________________________________________________________
Name: svn:mergeinfo
11 - /trunk/extensions/LiquidThreads/jquery/js2.combined.js:57390,59879,59883,59885-59886
22 + /trunk/extensions/LiquidThreads/jquery/js2.combined.js:57390,59879,59883,59885-59886,61563
Index: branches/wmf-deployment/extensions/LiquidThreads/lqt.js
@@ -612,20 +612,34 @@
613613
614614 // Update thread-level menu, if appropriate
615615 if ( $j(threadWrapper).hasClass( 'lqt-thread-topmost' ) ) {
 616+ // To perform better, check the 3 elements before the top-level thread container before
 617+ // scanning the whole document
 618+ var menu = undefined;
616619 var threadLevelCommandSelector = '#lqt-threadlevel-commands-'+threadId;
 620+ var traverseElement = $j(threadWrapper);
617621
618 - var menu = $j(threadLevelCommandSelector);
 622+ for( i=0;i<3 && typeof menu == 'undefined';++i ) {
 623+ traverseElement = traverseElement.prev();
 624+ if ( traverseElement.is(threadLevelCommandSelector) ) {
 625+ menu = traverseElement
 626+ }
 627+ }
 628+
 629+ if ( typeof menu == 'undefined' ) {
 630+ menu = $j(threadLevelCommandSelector);
 631+ }
 632+
619633 liquidThreads.setupThreadMenu( menu, threadId );
620634 }
621635
622636 // Check for a "show replies" button
623 - $j('a.lqt-show-replies').click( liquidThreads.showReplies );
 637+ $j(threadContainer).find('a.lqt-show-replies').click( liquidThreads.showReplies );
624638
625639 // "Show more posts" link
626 - $j('a.lqt-show-more-posts').click( liquidThreads.showMore );
 640+ $j(threadContainer).find('a.lqt-show-more-posts').click( liquidThreads.showMore );
627641
628642 // Handler for "Link to this" button
629 - $j('.lqt-command-link').click( liquidThreads.showLinkWindow );
 643+ $j(threadContainer).find('.lqt-command-link').click( liquidThreads.showLinkWindow );
630644 },
631645
632646 'showReplies' : function(e) {
Property changes on: branches/wmf-deployment/extensions/LiquidThreads
___________________________________________________________________
Name: svn:mergeinfo
633647 - /trunk/extensions/LiquidThreads:57390,58990-59196,59198-59661,59666-59743,59782-59877,59879,59883,59885-59886
634648 + /trunk/extensions/LiquidThreads:57390,58990-59196,59198-59661,59666-59743,59782-59877,59879,59883,59885-59886,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