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