From: Roan Kattouw Date: Tue, 25 Oct 2011 14:41:58 +0000 (+0000) Subject: (bug 31514) Followup r99031: allow clicking of links in table headers in a different... X-Git-Tag: 1.31.0-rc.0~26920 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=d4e2a4bf577d3606b9920a3b1bbb3110d996f64d;p=lhc%2Fweb%2Fwiklou.git (bug 31514) Followup r99031: allow clicking of links in table headers in a different way that doesn't break expand/collapse links. --- diff --git a/resources/jquery/jquery.tablesorter.js b/resources/jquery/jquery.tablesorter.js index 3b6de7b229..443024b4fc 100644 --- a/resources/jquery/jquery.tablesorter.js +++ b/resources/jquery/jquery.tablesorter.js @@ -585,8 +585,13 @@ cacheRegexs(); // Apply event handling to headers - // this is to big, perhaps break it out? + // this is too big, perhaps break it out? $headers.click( function( e ) { + if ( e.target.nodeName.toLowerCase() == 'a' ) { + // The user clicked on a link inside a table header + // Do nothing and let the default link click action continue + return true; + } if ( firstTime ) { firstTime = false; @@ -668,12 +673,7 @@ }; return false; } - } ) - // Allow links in headers to be clicked - .find( 'a' ).click( function( e ) { - e.stopPropagation(); } ); - } ); },