Index: trunk/phase3/resources/mediawiki.special/mediawiki.special.undelete.js |
— | — | @@ -1,15 +1,10 @@ |
2 | 2 | /* |
3 | 3 | * JavaScript for Specical:Undelete |
4 | | - * @author: Code taken from [[b:MediaWiki:Gadget-EnhancedUndelete.js]] (originally written by [[b:User:Darklama]]) |
5 | 4 | */ |
6 | | -( function( $ ) { |
7 | | - $(function() { |
8 | | - $('#mw-undelete-invert').click( function(e) { |
9 | | - e.stopImmediatePropagation(); |
10 | | - $('input:checkbox').each( function() { |
11 | | - this.checked = !this.checked; |
12 | | - }); |
13 | | - return false; |
14 | | - }); |
15 | | - }); |
16 | | -} )( jQuery ); |
| 5 | +jQuery( document ).ready( function( $ ) { |
| 6 | + $( '#mw-undelete-invert' ).click( function( e ) { |
| 7 | + e.preventDefault(); |
| 8 | + $( '#undelete' ).find( 'input:checkbox' ) |
| 9 | + .prop( 'checked', function( i, val ) { return !val; } ); |
| 10 | + } ); |
| 11 | +} ); |