Index: trunk/phase3/includes/specials/SpecialPreferences.php |
— | — | @@ -54,6 +54,7 @@ |
55 | 55 | |
56 | 56 | $wgOut->addModules( 'mediawiki.legacy.prefs' ); |
57 | 57 | $wgOut->addModuleScripts( 'mediawiki.specials.preferences' ); |
| 58 | + $wgOut->addModuleStyles( 'mediawiki.specials.preferences' ); |
58 | 59 | |
59 | 60 | if ( $wgRequest->getCheck( 'success' ) ) { |
60 | 61 | $wgOut->wrapWikiMsg( |
Index: trunk/phase3/resources/Resources.php |
— | — | @@ -321,6 +321,7 @@ |
322 | 322 | ) ), |
323 | 323 | 'mediawiki.specials.preferences' => new ResourceLoaderFileModule( array( |
324 | 324 | 'scripts' => 'resources/mediawiki.specials/mediawiki.specials.preferences.js', |
| 325 | + 'styles' => 'resources/mediawiki.specials/mediawiki.specials.preferences.css', |
325 | 326 | ) ), |
326 | 327 | 'mediawiki.specials.search' => new ResourceLoaderFileModule( array( |
327 | 328 | 'scripts' => 'resources/mediawiki.specials/mediawiki.specials.search.js', |
— | — | @@ -490,4 +491,4 @@ |
491 | 492 | 'mediawiki.legacy.wikiprintable' => new ResourceLoaderFileModule( array( |
492 | 493 | 'styles' => array( 'skins/common/wikiprintable.css' => array( 'media' => 'print' ) ), |
493 | 494 | ) ), |
494 | | -); |
\ No newline at end of file |
| 495 | +); |
Index: trunk/phase3/resources/mediawiki.specials/mediawiki.specials.preferences.js |
— | — | @@ -38,3 +38,22 @@ |
39 | 39 | ) |
40 | 40 | ); |
41 | 41 | } ); |
| 42 | + |
| 43 | +// Lame tip to let user know if its email is valid. See bug 22449 |
| 44 | +$( '#mw-input-emailaddress' ) |
| 45 | + .keyup( function() { |
| 46 | + var mailtxt = $(this).val(); |
| 47 | + if( mailtxt == '' ) { |
| 48 | + // mail is optional ! |
| 49 | + $(this).removeClass( "invalid" ); |
| 50 | + $(this).removeClass( "valid" ); |
| 51 | + return; |
| 52 | + } |
| 53 | + if( mailtxt.match( /.+@.+\..+/ ) ) { |
| 54 | + $(this).addClass( "valid" ); |
| 55 | + $(this).removeClass( "invalid" ); |
| 56 | + } else { |
| 57 | + $(this).addClass( "invalid" ); |
| 58 | + $(this).removeClass( "valid" ); |
| 59 | + } |
| 60 | + } ); |
Index: trunk/phase3/resources/mediawiki.specials/mediawiki.specials.preferences.css |
— | — | @@ -0,0 +1,8 @@ |
| 2 | +input.valid { |
| 3 | + background-color: #C0FFC0; |
| 4 | + color: black; |
| 5 | +} |
| 6 | +input.invalid { |
| 7 | + background-color: #FFC0C0; |
| 8 | + color: black; |
| 9 | +} |
Property changes on: trunk/phase3/resources/mediawiki.specials/mediawiki.specials.preferences.css |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 10 | + native |