Merge "Align "What's this" vertically"
[lhc/web/wiklou.git] / resources / src / mediawiki.action / mediawiki.action.view.metadata.js
index a3a82d5..0d000c9 100644 (file)
                $col = $( '<td colspan="2"></td>' );
 
                $link = $( '<a>' )
-               .text( showText )
-               .attr( {
-                       role: 'button',
-                       tabindex: 0
-               } )
-               .on( 'click keypress', function ( e ) {
-                       if (
-                               e.type === 'click' ||
-                               e.type === 'keypress' && e.which === 13
-                       ) {
-                               if ( $table.hasClass( 'collapsed' ) ) {
-                                       $( this ).text( hideText );
-                               } else {
-                                       $( this ).text( showText );
+                       .text( showText )
+                       .attr( {
+                               role: 'button',
+                               tabindex: 0
+                       } )
+                       .on( 'click keypress', function ( e ) {
+                               if (
+                                       e.type === 'click' ||
+                                       e.type === 'keypress' && e.which === 13
+                               ) {
+                                       if ( $table.hasClass( 'collapsed' ) ) {
+                                               $( this ).text( hideText );
+                                       } else {
+                                               $( this ).text( showText );
+                                       }
+                                       $table.toggleClass( 'expanded collapsed' );
                                }
-                               $table.toggleClass( 'expanded collapsed' );
-                       }
-               } );
+                       } );
 
                $col.append( $link );
                $row.append( $col );