X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki%2Fpage%2Fpatrol.ajax.js;h=d8fb249dc69ec207e376223ab2a22a66db0523c4;hb=85ac1b5d7c7ca50a93f2d16639cdde2f46bc133e;hp=89bbbe79d8d12b13b5882e61ccdfae9e092c7659;hpb=939199bcea28a3b13c49c0f808d11d415660b924;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki/page/patrol.ajax.js b/resources/src/mediawiki/page/patrol.ajax.js index 89bbbe79d8..d8fb249dc6 100644 --- a/resources/src/mediawiki/page/patrol.ajax.js +++ b/resources/src/mediawiki/page/patrol.ajax.js @@ -33,20 +33,19 @@ formatversion: 2, action: 'patrol', rcid: rcid - } ) - .done( function ( data ) { + } ).done( function ( data ) { + var title; // Remove all patrollinks from the page (including any spinners inside). $patrolLinks.closest( '.patrollink' ).remove(); if ( data.patrol !== undefined ) { // Success - var title = new mw.Title( data.patrol.title ); + title = new mw.Title( data.patrol.title ); mw.notify( mw.msg( 'markedaspatrollednotify', title.toText() ) ); } else { // This should never happen as errors should trigger fail mw.notify( mw.msg( 'markedaspatrollederrornotify' ), { type: 'error' } ); } - } ) - .fail( function ( error ) { + } ).fail( function ( error ) { $spinner.remove(); // Restore the patrol link. This allows the user to try again // (or open it in a new window, bypassing this ajax module).