Index: trunk/extensions/Contest/resources/contest.special.contest.js |
— | — | @@ -0,0 +1,41 @@ |
| 2 | +/** |
| 3 | + * JavasSript for the Contest MediaWiki extension. |
| 4 | + * @see https://www.mediawiki.org/wiki/Extension:Contest |
| 5 | + * |
| 6 | + * @licence GNU GPL v3 or later |
| 7 | + * @author Jeroen De Dauw <jeroendedauw at gmail dot com> |
| 8 | + */ |
| 9 | + |
| 10 | +(function( $, mw ) { $( document ).ready( function() { |
| 11 | + |
| 12 | + var _this = this; |
| 13 | + |
| 14 | + this.sendReminder = function() { |
| 15 | + |
| 16 | + }; |
| 17 | + |
| 18 | + this.showReminderDialog = function() { |
| 19 | + $dialog = $( '<div />' ).html( '' ).dialog( { |
| 20 | + 'title': mw.msg( 'contest-contest-reminder-title' ), |
| 21 | + 'buttons': [ |
| 22 | + { |
| 23 | + 'text': mw.msg( 'contest-contest-reminder-send' ), |
| 24 | + 'click': function() { _this.sendReminder(); } |
| 25 | + }, |
| 26 | + { |
| 27 | + 'text': mw.msg( 'contest-contest-reminder-cancel' ), |
| 28 | + 'click': function() { |
| 29 | + $( this ).dialog( 'close' ); |
| 30 | + } |
| 31 | + } |
| 32 | + ] |
| 33 | + } ); |
| 34 | + |
| 35 | + $dialog.append( $( '<p />' ).text( mw.msg( 'contest-contest-reminder-preview' ) ) ).append( '<hr />' ); |
| 36 | + |
| 37 | + $dialog.append( $( '#reminder-content' ).html() ); |
| 38 | + }; |
| 39 | + |
| 40 | + $( '#send-reminder' ).button().click( this.showReminderDialog ); |
| 41 | + |
| 42 | +} ); })( window.jQuery, window.mediaWiki ); |
\ No newline at end of file |