Index: trunk/extensions/EducationProgram/specials/SpecialEPFormPage.php |
— | — | @@ -53,6 +53,8 @@ |
54 | 54 | $this->listPage = $listPage; |
55 | 55 | |
56 | 56 | parent::__construct( $name, $right, false ); |
| 57 | + |
| 58 | + $this->getOutput()->addModules( 'ep.formpage' ); |
57 | 59 | } |
58 | 60 | |
59 | 61 | /** |
Index: trunk/extensions/EducationProgram/EducationProgram.php |
— | — | @@ -170,6 +170,15 @@ |
171 | 171 | ), |
172 | 172 | ); |
173 | 173 | |
| 174 | +$wgResourceModules['ep.formpage'] = $moduleTemplate + array( |
| 175 | + 'scripts' => array( |
| 176 | + 'ep.formpage.js', |
| 177 | + ), |
| 178 | + 'dependencies' => array( |
| 179 | + 'jquery.ui.button', |
| 180 | + ), |
| 181 | +); |
| 182 | + |
174 | 183 | unset( $moduleTemplate ); |
175 | 184 | |
176 | 185 | $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 |
1 | 23 | + native |