http://www.mediawiki.org/wiki/Special:Code/MediaWiki/100307

Revision: 100307
Author:   jeroendedauw
Date:     2011-10-20 00:47:53 +0000 (Thu, 20 Oct 2011)
Log Message:
-----------
added subject to reminder email preview

Modified Paths:
--------------
    trunk/extensions/Contest/Contest.i18n.php
    trunk/extensions/Contest/Contest.php
    trunk/extensions/Contest/resources/contest.special.contest.js
    trunk/extensions/Contest/specials/SpecialContest.php

Modified: trunk/extensions/Contest/Contest.i18n.php
===================================================================
--- trunk/extensions/Contest/Contest.i18n.php   2011-10-20 00:45:32 UTC (rev 
100306)
+++ trunk/extensions/Contest/Contest.i18n.php   2011-10-20 00:47:53 UTC (rev 
100307)
@@ -165,6 +165,7 @@
        'contest-contest-reminder-close' => 'Close',
        'contest-contest-reminder-retry' => 'Retry sending',
        'contest-contest-reminder-failed' => 'Could not sent the reminder 
emails.',
+       'contest-contest-reminder-subject' => 'Subject:',
 
        // Contestant pager
        'contest-contestant-id' => 'ID',
@@ -310,6 +311,7 @@
        'contest-contest-reminder-close' => 'Close button text',
        'contest-contest-reminder-retry' => 'Retry button text',
        'contest-contest-reminder-failed' => 'Failiure message, displayed in an 
alert box',
+       'contest-contest-reminder-subject' => 'Email subject indicator',
 
        // Special:MyContests
        'contest-mycontests-toplink' => 'Text for link in the user menu (i.e. 
where watchlist and preferences are linked)',

Modified: trunk/extensions/Contest/Contest.php
===================================================================
--- trunk/extensions/Contest/Contest.php        2011-10-20 00:45:32 UTC (rev 
100306)
+++ trunk/extensions/Contest/Contest.php        2011-10-20 00:47:53 UTC (rev 
100307)
@@ -169,6 +169,7 @@
                'contest-contest-reminder-close',
                'contest-contest-reminder-retry',
                'contest-contest-reminder-failed',
+               'contest-contest-reminder-subject',
        ),
        'dependencies' => array(
                'jquery.ui.button', 'jquery.ui.dialog',

Modified: trunk/extensions/Contest/resources/contest.special.contest.js
===================================================================
--- trunk/extensions/Contest/resources/contest.special.contest.js       
2011-10-20 00:45:32 UTC (rev 100306)
+++ trunk/extensions/Contest/resources/contest.special.contest.js       
2011-10-20 00:47:53 UTC (rev 100307)
@@ -32,6 +32,7 @@
                
                $dialog = $( '<div />' ).html( '' ).dialog( {
                        'title': mw.msg( 'contest-contest-reminder-title' ),
+                       'minWidth': 550,
                        'buttons': [
                                {
                                        'text': mw.msg( 
'contest-contest-reminder-send' ),
@@ -70,6 +71,12 @@
                
                $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() ); 
        };
        

Modified: trunk/extensions/Contest/specials/SpecialContest.php
===================================================================
--- trunk/extensions/Contest/specials/SpecialContest.php        2011-10-20 
00:45:32 UTC (rev 100306)
+++ trunk/extensions/Contest/specials/SpecialContest.php        2011-10-20 
00:47:53 UTC (rev 100307)
@@ -141,7 +141,11 @@
                        array(
                                'id' => 'send-reminder',
                                'data-token' => $this->getUser()->editToken(),
-                               'data-contest-id' => $contest->getId()
+                               'data-contest-id' => $contest->getId(),
+                       
+                               // Note: this is a copy of the message in 
ContestContestant::sendReminderEmail.
+                               // If it's changed or modified by a hook, this 
message might not be accurate.
+                               'data-reminder-subject' => wfMsgExt( 
'contest-email-reminder-title', 'parsemag', $contest->getDaysLeft() )
                        ),
                        wfMsg( 'contest-contest-send-reminder' )
                ) );


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to