http://www.mediawiki.org/wiki/Special:Code/MediaWiki/100311
Revision: 100311
Author: reedy
Date: 2011-10-20 00:59:48 +0000 (Thu, 20 Oct 2011)
Log Message:
-----------
Trim trailing whitespace
Modified Paths:
--------------
trunk/extensions/Contest/resources/contest.special.contest.js
Modified: trunk/extensions/Contest/resources/contest.special.contest.js
===================================================================
--- trunk/extensions/Contest/resources/contest.special.contest.js
2011-10-20 00:59:28 UTC (rev 100310)
+++ trunk/extensions/Contest/resources/contest.special.contest.js
2011-10-20 00:59:48 UTC (rev 100311)
@@ -1,15 +1,15 @@
/**
* JavasSript for the Contest MediaWiki extension.
* @see https://www.mediawiki.org/wiki/Extension:Contest
- *
+ *
* @licence GNU GPL v3 or later
* @author Jeroen De Dauw <jeroendedauw at gmail dot com>
*/
(function( $, mw ) { $( document ).ready( function() {
-
+
var _this = this;
-
+
this.sendReminder = function( callback ) {
var requestArgs = {
'action': 'mailcontestants',
@@ -17,7 +17,7 @@
'token': $( '#send-reminder' ).attr( 'data-token' ),
'contestids': $( '#send-reminder' ).attr(
'data-contest-id' )
};
-
+
$.post(
wgScriptPath + '/api.php',
requestArgs,
@@ -26,10 +26,10 @@
}
);
};
-
+
this.showReminderDialog = function() {
var $dialog = null;
-
+
$dialog = $( '<div />' ).html( '' ).dialog( {
'title': mw.msg( 'contest-contest-reminder-title' ),
'minWidth': 550,
@@ -40,10 +40,10 @@
'click': function() {
var $send = $(
'#reminder-send-button' );
var $cancel = $(
'#reminder-cancel-button' );
-
+
$send.button( 'option',
'disabled', true );
$send.button( 'option',
'label', mw.msg( 'contest-contest-reminder-sending' ) );
-
+
_this.sendReminder( function(
data ) {
if ( data.success ) {
$dialog.text(
mw.msg( 'contest-contest-reminder-success', data.contestantcount ) );
@@ -53,7 +53,7 @@
else {
$send.button(
'option', 'label', mw.msg( 'contest-contest-reminder-retry' ) );
$send.button(
'option', 'disabled', false );
-
+
alert( mw.msg(
'contest-contest-reminder-failed' ) );
}
} );
@@ -68,18 +68,18 @@
}
]
} );
-
+
$dialog.append( $( '<p />' ).text( mw.msg(
'contest-contest-reminder-preview' ) ) ).append( '<hr />' );
-
+
$dialog.append( $( '<p />' )
.html( $( '<b />' )
.text( mw.msg(
'contest-contest-reminder-subject' ) ) )
.append( ' ' + $( '#send-reminder' ).attr(
'data-reminder-subject' ) ) )
.append( '<hr />' );
-
- $dialog.append( $( '#reminder-content' ).html() );
+
+ $dialog.append( $( '#reminder-content' ).html() );
};
-
+
$( '#send-reminder' ).button().click( this.showReminderDialog );
-
-} ); })( window.jQuery, window.mediaWiki );
\ No newline at end of file
+
+} ); })( window.jQuery, window.mediaWiki );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs