r90587 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90586‎ | r90587 | r90588 >
Date:14:51, 22 June 2011
Author:mgrabovsky
Status:ok
Tags:
Comment:
Follow-up r90359: modify code per Krinkle's comments
Modified paths:
  • /trunk/phase3/resources/mediawiki.special/mediawiki.special.undelete.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki.special/mediawiki.special.undelete.js
@@ -1,15 +1,10 @@
22 /*
33 * JavaScript for Specical:Undelete
4 - * @author: Code taken from [[b:MediaWiki:Gadget-EnhancedUndelete.js]] (originally written by [[b:User:Darklama]])
54 */
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+} );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r90359(bug 29443) Special:Undelete should invert checkboxes without reloading...mgrabovsky19:57, 18 June 2011

Status & tagging log