r106716 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106715‎ | r106716 | r106717 >
Date:22:48, 19 December 2011
Author:jeroendedauw
Status:deferred
Tags:educationprogram 
Comment:
make cancel button on edit pages work
Modified paths:
  • /trunk/extensions/EducationProgram/EducationProgram.php (modified) (history)
  • /trunk/extensions/EducationProgram/resources/ep.formpage.js (added) (history)
  • /trunk/extensions/EducationProgram/specials/SpecialEPFormPage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/specials/SpecialEPFormPage.php
@@ -53,6 +53,8 @@
5454 $this->listPage = $listPage;
5555
5656 parent::__construct( $name, $right, false );
 57+
 58+ $this->getOutput()->addModules( 'ep.formpage' );
5759 }
5860
5961 /**
Index: trunk/extensions/EducationProgram/EducationProgram.php
@@ -170,6 +170,15 @@
171171 ),
172172 );
173173
 174+$wgResourceModules['ep.formpage'] = $moduleTemplate + array(
 175+ 'scripts' => array(
 176+ 'ep.formpage.js',
 177+ ),
 178+ 'dependencies' => array(
 179+ 'jquery.ui.button',
 180+ ),
 181+);
 182+
174183 unset( $moduleTemplate );
175184
176185 $egEPSettings = array();
Index: trunk/extensions/EducationProgram/resources/ep.formpage.js
@@ -0,0 +1,21 @@
 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+ $( document ).ready( function() {
 13+
 14+ $( '#bodyContent' ).find( '[type="submit"]' ).button();
 15+
 16+ $( '#cancelEdit' ).click( function() {
 17+ window.location = $( this ).attr( 'target-url' );
 18+ } );
 19+
 20+ } );
 21+
 22+})( window.jQuery, window.mediaWiki );
\ No newline at end of file
Property changes on: trunk/extensions/EducationProgram/resources/ep.formpage.js
___________________________________________________________________
Added: svn:eol-style
123 + native

Status & tagging log