r96181 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96180‎ | r96181 | r96182 >
Date:13:34, 3 September 2011
Author:santhosh
Status:ok
Tags:
Comment:
Fix javascript error. $('input.narayam-scheme')[0] does not give jquery object. Use $('input.narayam-scheme:first') instead.
Modified paths:
  • /trunk/extensions/Narayam/js/ext.narayam.core.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Narayam/js/ext.narayam.core.js
@@ -475,7 +475,8 @@
476476 that.setScheme( savedScheme );
477477 $( '#narayam-' + savedScheme ).attr( 'checked', 'checked' );
478478 } else {
479 - $('input.narayam-scheme')[0].attr( 'checked', 'checked' );
 479+ //if no saved input scheme, select the first.
 480+ $('input.narayam-scheme:first').attr( 'checked', 'checked' );
480481 }
481482 var enabledCookie = $.cookie( 'narayam-enabled' );
482483 if ( enabledCookie == '1' || ( mw.config.get( 'wgNarayamEnabledByDefault' ) && enabledCookie !== '0' ) ) {

Status & tagging log