r101297 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101296‎ | r101297 | r101298 >
Date:11:14, 30 October 2011
Author:liangent
Status:deferred
Tags:
Comment:
Remove the check for the existence of <a> tags as they can be regular links to other pages.
Modified paths:
  • /branches/liangent/makeCollapsible_custom/phase3/resources/jquery/jquery.makeCollapsible.js (modified) (history)

Diff [purge]

Index: branches/liangent/makeCollapsible_custom/phase3/resources/jquery/jquery.makeCollapsible.js
@@ -282,14 +282,12 @@
283283 toggleLinkCustom( $(this), e, $that, $customTogglers );
284284 } );
285285
286 - // If there's no link for users using keyboard navigation
287 - if ( !$customTogglers.is( 'a' ) && !$customTogglers.find( 'a' ).length ) {
288 - $customTogglers.attr( 'tabindex', '0' ).bind( 'keydown.mw-collapse', function( e ) {
289 - if ( e.which === 13 ) { // Enter key
290 - toggleLinkCustom( $(this), e, $that, $customTogglers );
291 - }
292 - } );
293 - }
 286+ // For users using keyboard navigation
 287+ $customTogglers.attr( 'tabindex', '0' ).bind( 'keydown.mw-collapse', function( e ) {
 288+ if ( e.which === 13 ) { // Enter key
 289+ toggleLinkCustom( $(this), e, $that, $customTogglers );
 290+ }
 291+ } );
294292 } else {
295293 mw.log( _fn + 'mw-customcollapsible: Missing toggler!' );
296294 }

Status & tagging log