r100701 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100700‎ | r100701 | r100702 >
Date:14:41, 25 October 2011
Author:catrope
Status:ok
Tags:
Comment:
(bug 31514) Followup r99031: allow clicking of links in table headers in a different way that doesn't break expand/collapse links.
Modified paths:
  • /trunk/phase3/resources/jquery/jquery.tablesorter.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/jquery/jquery.tablesorter.js
@@ -585,8 +585,13 @@
586586 cacheRegexs();
587587
588588 // Apply event handling to headers
589 - // this is to big, perhaps break it out?
 589+ // this is too big, perhaps break it out?
590590 $headers.click( function( e ) {
 591+ if ( e.target.nodeName.toLowerCase() == 'a' ) {
 592+ // The user clicked on a link inside a table header
 593+ // Do nothing and let the default link click action continue
 594+ return true;
 595+ }
591596
592597 if ( firstTime ) {
593598 firstTime = false;
@@ -668,12 +673,7 @@
669674 };
670675 return false;
671676 }
672 - } )
673 - // Allow links in headers to be clicked
674 - .find( 'a' ).click( function( e ) {
675 - e.stopPropagation();
676677 } );
677 -
678678 } );
679679 },
680680

Follow-up revisions

RevisionCommit summaryAuthorDate
r1011261.18wmf1: MFT r98669, r99164, r99321, r99332, r99632, r99897, r99914, r99952,...catrope12:09, 28 October 2011
r101203REL1_18 MFT r99286, r99332, r100398, r100701, r101010reedy21:20, 28 October 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r99031Fix the bug reported on w:en:WP:VP/T where clicking on links in sortable tabl...catrope19:27, 5 October 2011

Status & tagging log