Merging resourceloader branch into trunk. Full documentation is at http://www.mediawi...
[lhc/web/wiklou.git] / resources / mw / mw.legacy.changepassword.js
1 /*
2 * Legacy emulation for the now depricated changepassword.js
3 *
4 * Ported by: Trevor Parscal
5 */
6
7 ( function( $ ) {
8
9 $.extend( mw.legacy, {
10 'onNameChange': function() {
11 var state = mw.legacy.wgUserName != $( '#wpName' ).val();
12 $( '#wpPassword' ).attr( 'disabled', state );
13 $( '#wpComment' ).attr( 'disabled', !state );
14 },
15 'onNameChangeHook': function() {
16 $( '#wpName' ).blur( mw.legacy.onNameChange );
17 }
18 } );
19
20 /* Initialization */
21
22 $( document ).ready( function() {
23 mw.legacy.onNameChangeHook();
24 } );
25
26 } )( jQuery );