r100311 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100310‎ | r100311 | r100312 >
Date:00:59, 20 October 2011
Author:reedy
Status:ok
Tags:
Comment:
Trim trailing whitespace
Modified paths:
  • /trunk/extensions/Contest/resources/contest.special.contest.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Contest/resources/contest.special.contest.js
@@ -1,15 +1,15 @@
22 /**
33 * JavasSript for the Contest MediaWiki extension.
44 * @see https://www.mediawiki.org/wiki/Extension:Contest
5 - *
 5+ *
66 * @licence GNU GPL v3 or later
77 * @author Jeroen De Dauw <jeroendedauw at gmail dot com>
88 */
99
1010 (function( $, mw ) { $( document ).ready( function() {
11 -
 11+
1212 var _this = this;
13 -
 13+
1414 this.sendReminder = function( callback ) {
1515 var requestArgs = {
1616 'action': 'mailcontestants',
@@ -17,7 +17,7 @@
1818 'token': $( '#send-reminder' ).attr( 'data-token' ),
1919 'contestids': $( '#send-reminder' ).attr( 'data-contest-id' )
2020 };
21 -
 21+
2222 $.post(
2323 wgScriptPath + '/api.php',
2424 requestArgs,
@@ -26,10 +26,10 @@
2727 }
2828 );
2929 };
30 -
 30+
3131 this.showReminderDialog = function() {
3232 var $dialog = null;
33 -
 33+
3434 $dialog = $( '<div />' ).html( '' ).dialog( {
3535 'title': mw.msg( 'contest-contest-reminder-title' ),
3636 'minWidth': 550,
@@ -40,10 +40,10 @@
4141 'click': function() {
4242 var $send = $( '#reminder-send-button' );
4343 var $cancel = $( '#reminder-cancel-button' );
44 -
 44+
4545 $send.button( 'option', 'disabled', true );
4646 $send.button( 'option', 'label', mw.msg( 'contest-contest-reminder-sending' ) );
47 -
 47+
4848 _this.sendReminder( function( data ) {
4949 if ( data.success ) {
5050 $dialog.text( mw.msg( 'contest-contest-reminder-success', data.contestantcount ) );
@@ -53,7 +53,7 @@
5454 else {
5555 $send.button( 'option', 'label', mw.msg( 'contest-contest-reminder-retry' ) );
5656 $send.button( 'option', 'disabled', false );
57 -
 57+
5858 alert( mw.msg( 'contest-contest-reminder-failed' ) );
5959 }
6060 } );
@@ -68,18 +68,18 @@
6969 }
7070 ]
7171 } );
72 -
 72+
7373 $dialog.append( $( '<p />' ).text( mw.msg( 'contest-contest-reminder-preview' ) ) ).append( '<hr />' );
74 -
 74+
7575 $dialog.append( $( '<p />' )
7676 .html( $( '<b />' )
7777 .text( mw.msg( 'contest-contest-reminder-subject' ) ) )
7878 .append( ' ' + $( '#send-reminder' ).attr( 'data-reminder-subject' ) ) )
7979 .append( '<hr />' );
80 -
81 - $dialog.append( $( '#reminder-content' ).html() );
 80+
 81+ $dialog.append( $( '#reminder-content' ).html() );
8282 };
83 -
 83+
8484 $( '#send-reminder' ).button().click( this.showReminderDialog );
85 -
86 -} ); })( window.jQuery, window.mediaWiki );
\ No newline at end of file
 85+
 86+} ); })( window.jQuery, window.mediaWiki );

Follow-up revisions

RevisionCommit summaryAuthorDate
r1003131.18wmf1 MFT r100295, r100302, r100307, r100308, r100309, r100311reedy01:03, 20 October 2011

Status & tagging log