http://www.mediawiki.org/wiki/Special:Code/MediaWiki/100701

Revision: 100701
Author:   catrope
Date:     2011-10-25 14:41:58 +0000 (Tue, 25 Oct 2011)
Log Message:
-----------
(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: trunk/phase3/resources/jquery/jquery.tablesorter.js
===================================================================
--- trunk/phase3/resources/jquery/jquery.tablesorter.js 2011-10-25 14:31:27 UTC 
(rev 100700)
+++ trunk/phase3/resources/jquery/jquery.tablesorter.js 2011-10-25 14:41:58 UTC 
(rev 100701)
@@ -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();
                                        } );
-
                                } );
                        },
 


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to