r98715 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98714‎ | r98715 | r98716 >
Date:20:51, 2 October 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
use jquery button on signup and submission pages
Modified paths:
  • /trunk/extensions/Contest/Contest.php (modified) (history)
  • /trunk/extensions/Contest/resources/contest.special.signup.js (added) (history)
  • /trunk/extensions/Contest/resources/contest.special.submission.js (added) (history)
  • /trunk/extensions/Contest/specials/SpecialContestSignup.php (modified) (history)
  • /trunk/extensions/Contest/specials/SpecialContestSubmission.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Contest/specials/SpecialContestSubmission.php
@@ -120,9 +120,11 @@
121121 $form->setSubmitText( wfMsg( 'contest-submission-submit' ) );
122122
123123 if( $form->show() ){
124 - // TODO: we might want to have a title field here
125124 $this->getOutput()->redirect( $this->getTitle( $contestant->getContest()->getField( 'name' ) )->getLocalURL() );
126125 }
 126+ else {
 127+ $this->getOutput()->addModules( 'contest.special.submission' );
 128+ }
127129 }
128130
129131 /**
Index: trunk/extensions/Contest/specials/SpecialContestSignup.php
@@ -162,6 +162,9 @@
163163 if( $form->show() ){
164164 $this->showSucess( $contest );
165165 }
 166+ else {
 167+ $this->getOutput()->addModules( 'contest.special.signup' );
 168+ }
166169 }
167170
168171 /**
Index: trunk/extensions/Contest/Contest.php
@@ -159,13 +159,29 @@
160160 'styles' => array(
161161 'contest.special.welcome.css',
162162 ),
163 - 'messages' => array(
 163+ 'dependencies' => array(
 164+ 'jquery.ui.button'
 165+ )
 166+);
 167+
 168+$wgResourceModules['contest.special.signup'] = $moduleTemplate + array(
 169+ 'scripts' => array(
 170+ 'contest.special.signup.js',
164171 ),
165172 'dependencies' => array(
166173 'jquery.ui.button'
167174 )
168175 );
169176
 177+$wgResourceModules['contest.special.submission'] = $moduleTemplate + array(
 178+ 'scripts' => array(
 179+ 'contest.special.submission.js',
 180+ ),
 181+ 'dependencies' => array(
 182+ 'jquery.ui.button'
 183+ )
 184+);
 185+
170186 unset( $moduleTemplate );
171187
172188 $egContestSettings = array();
Index: trunk/extensions/Contest/resources/contest.special.submission.js
@@ -0,0 +1,17 @@
 2+/**
 3+ * JavasSript for the Contest MediaWiki extension.
 4+ * @see https://secure.wikimedia.org/wikipedia/mediawiki/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 ) {
 11+
 12+ $( document ).ready( function() {
 13+
 14+ $( '.mw-htmlform-submit' ).button();
 15+
 16+ } );
 17+
 18+})( window.jQuery, window.mediaWiki );
\ No newline at end of file
Property changes on: trunk/extensions/Contest/resources/contest.special.submission.js
___________________________________________________________________
Added: svn:eol-style
119 + native
Index: trunk/extensions/Contest/resources/contest.special.signup.js
@@ -0,0 +1,17 @@
 2+/**
 3+ * JavasSript for the Contest MediaWiki extension.
 4+ * @see https://secure.wikimedia.org/wikipedia/mediawiki/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 ) {
 11+
 12+ $( document ).ready( function() {
 13+
 14+ $( '.mw-htmlform-submit' ).button();
 15+
 16+ } );
 17+
 18+})( window.jQuery, window.mediaWiki );
\ No newline at end of file
Property changes on: trunk/extensions/Contest/resources/contest.special.signup.js
___________________________________________________________________
Added: svn:eol-style
119 + native

Status & tagging log