r110680 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110679‎ | r110680 | r110681 >
Date:19:45, 3 February 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
some ui work on ambassador profile pages
Modified paths:
  • /trunk/extensions/EducationProgram/EducationProgram.php (modified) (history)
  • /trunk/extensions/EducationProgram/actions/EPEditAction.php (modified) (history)
  • /trunk/extensions/EducationProgram/resources/ep.ambprofile.js (added) (history)
  • /trunk/extensions/EducationProgram/specials/SpecialAmbassadorProfile.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/EducationProgram.php
@@ -343,6 +343,15 @@
344344 ),
345345 );
346346
 347+$wgResourceModules['ep.ambprofile'] = $moduleTemplate + array(
 348+ 'scripts' => array(
 349+ 'ep.ambprofile.js',
 350+ ),
 351+ 'dependencies' => array(
 352+ 'jquery.ui.button',
 353+ ),
 354+);
 355+
347356 $wgResourceModules['ep.addorg'] = $moduleTemplate + array(
348357 'scripts' => array(
349358 'ep.addorg.js',
Index: trunk/extensions/EducationProgram/actions/EPEditAction.php
@@ -225,8 +225,6 @@
226226 $action = $this->isNew() ? 'add' : 'edit';
227227 $form->setWrapperLegend( $this->msg( strtolower( $this->getName() ) . '-' . $action . '-legend' ) );
228228
229 - $c = $this->getItemClass(); // Yeah, this is needed in PHP 5.3 >_>
230 -
231229 $form->addButton(
232230 'cancelEdit',
233231 wfMsg( 'cancel' ),
Index: trunk/extensions/EducationProgram/specials/SpecialAmbassadorProfile.php
@@ -33,8 +33,16 @@
3434 }
3535
3636 parent::execute( $subPage );
 37+
 38+ $this->getOutput()->addModules( 'ep.ambprofile' );
3739 }
3840
 41+ protected function getForm() {
 42+ $form = parent::getForm();
 43+ $form->setSubmitTooltip( 'ep-form-save' );
 44+ return $form;
 45+ }
 46+
3947 protected function getMsgPrefix() {
4048 return strtolower( $this->getClassName() ) . '-';
4149 }
Index: trunk/extensions/EducationProgram/resources/ep.ambprofile.js
@@ -0,0 +1,13 @@
 2+/**
 3+ * JavasSript for the Education Program MediaWiki extension.
 4+ * @see https://www.mediawiki.org/wiki/Extension:Education_Program
 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+ $( '#bodyContent' ).find( '[type="submit"]' ).button();
 13+
 14+})( window.jQuery, window.mediaWiki );
\ No newline at end of file

Status & tagging log