Index: trunk/extensions/Translate/resources/ext.translate.special.languagestats.js |
— | — | @@ -31,10 +31,10 @@ |
32 | 32 | |
33 | 33 | // Build toggle link |
34 | 34 | var $toggler = $( '<span class="groupexpander collapsed">[</span>' ) |
35 | | - .append( $( '<a href="#" onclick="return false;"></a>' ) |
| 35 | + .append( $( '<a href="#"></a>' ) |
36 | 36 | .text( mw.msg( 'translate-langstats-expand' ) ) ) |
37 | 37 | .append( ']' ) |
38 | | - .click( function() { |
| 38 | + .click( function( e ) { |
39 | 39 | var $el = $( this ); |
40 | 40 | // Switch the state and toggle the rows |
41 | 41 | if ( $el.hasClass( 'collapsed' ) ) { |
— | — | @@ -46,6 +46,8 @@ |
47 | 47 | $el.addClass( 'collapsed' ).removeClass( 'expanded' ); |
48 | 48 | $el.find( '> a' ).text( mw.msg( 'translate-langstats-expand' ) ); |
49 | 49 | } |
| 50 | + |
| 51 | + e.preventDefault(); |
50 | 52 | } ); |
51 | 53 | |
52 | 54 | // Add the toggle link to the first cell of the meta group table-row |
— | — | @@ -66,10 +68,10 @@ |
67 | 69 | $allChildRows = $( 'tr[data-parentgroup]', $translateTable ), |
68 | 70 | $allToggles_cache = null, |
69 | 71 | $toggleAllButton = $( '<span class="collapsed">[</span>' ) |
70 | | - .append( $( '<a href="#" onclick="return false;"></a>' ) |
| 72 | + .append( $( '<a href="#""></a>' ) |
71 | 73 | .text( mw.msg( 'translate-langstats-expandall' ) ) ) |
72 | 74 | .append( ']' ) |
73 | | - .click( function() { |
| 75 | + .click( function( e ) { |
74 | 76 | var |
75 | 77 | $el = $( this ), |
76 | 78 | $allToggles = !!$allToggles_cache ? $allToggles_cache : $( '.groupexpander', $translateTable ); |
— | — | @@ -86,6 +88,8 @@ |
87 | 89 | $el.find( '> a' ).text( mw.msg( 'translate-langstats-expandall' ) ); |
88 | 90 | $allToggles.find( '> a' ).text( mw.msg( 'translate-langstats-expand' ) ); |
89 | 91 | } |
| 92 | + |
| 93 | + e.preventDefault(); |
90 | 94 | } ); |
91 | 95 | |
92 | 96 | // Initially hide them |