Index: trunk/extensions/ResourceLoaderTests/ResourceLoaderTests.alias.php |
— | — | @@ -0,0 +1,15 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Aliases for special pages of ResourceLoaderTests extension. |
| 5 | + * |
| 6 | + * @file |
| 7 | + */ |
| 8 | + |
| 9 | +$specialPageAliases = array(); |
| 10 | + |
| 11 | +/** English |
| 12 | + * @author Nike |
| 13 | + */ |
| 14 | +$specialPageAliases['en'] = array( |
| 15 | + 'ResourceLoaderTests' => array( 'ResourceLoaderTests' ), |
| 16 | +); |
Index: trunk/extensions/ResourceLoaderTests/ResourceLoaderTests.page.php |
— | — | @@ -0,0 +1,18 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +class SpecialResourceLoaderTests extends UnlistedSpecialPage { |
| 5 | + |
| 6 | + public function __construct() { |
| 7 | + parent::__construct( 'ResourceLoaderTests', 'resourceloadertests' ); |
| 8 | + } |
| 9 | + |
| 10 | + public function execute( $par ) { |
| 11 | + global $wgOut; |
| 12 | + |
| 13 | + $wgOut->addModules( 'ext.resourceLoaderTests.a' ); |
| 14 | + |
| 15 | + $this->setHeaders(); |
| 16 | + |
| 17 | + $wgOut->addHtml( '<a id="resourceloadertests-load-b" href="#">Load B</a>' ); |
| 18 | + } |
| 19 | +} |
Index: trunk/extensions/ResourceLoaderTests/ResourceLoaderTests.i18n.php |
— | — | @@ -0,0 +1,17 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalisation for ResourceLoader Tests extension |
| 5 | + * |
| 6 | + * @file |
| 7 | + * @ingroup Extensions |
| 8 | + */ |
| 9 | + |
| 10 | +$messages = array(); |
| 11 | + |
| 12 | +/** English |
| 13 | + * @author Trevor Parscal |
| 14 | + */ |
| 15 | +$messages['en'] = array( |
| 16 | + 'resourceloadertests' => 'ResourceLoader Tests', |
| 17 | + 'resourceloadertests-desc' => 'Tests functionaliy of ResrouceLoader.', |
| 18 | +); |
Index: trunk/extensions/ResourceLoaderTests/ResourceLoaderTests.php |
— | — | @@ -0,0 +1,49 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * ResourceLoader Tests extension |
| 5 | + * |
| 6 | + * @file |
| 7 | + * @ingroup Extensions |
| 8 | + * |
| 9 | + * @author Trevor Parscal <trevor@wikimedia.org> |
| 10 | + * @license GPL v2 or later |
| 11 | + * @version 0.1.0 |
| 12 | + */ |
| 13 | + |
| 14 | +/* Setup */ |
| 15 | + |
| 16 | +$wgExtensionCredits['other'][] = array( |
| 17 | + 'path' => __FILE__, |
| 18 | + 'name' => 'ResourceLoaderTests', |
| 19 | + 'author' => array( 'Trevor Parscal' ), |
| 20 | + 'version' => '0.1.0', |
| 21 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:ResourceLoaderTests', |
| 22 | + 'descriptionmsg' => 'resourceloadertests-desc', |
| 23 | +); |
| 24 | + |
| 25 | +$dir = dirname( __FILE__ ) . '/'; |
| 26 | +$wgExtensionMessagesFiles['ResourceLoaderTests'] = $dir . 'ResourceLoaderTests.i18n.php'; |
| 27 | +$wgExtensionAliasesFiles[ 'ResourceLoaderTests' ] = $dir . 'ResourceLoaderTests.alias.php'; |
| 28 | +$wgAutoloadClasses[ 'SpecialResourceLoaderTests' ] = $dir . 'ResourceLoaderTests.page.php'; |
| 29 | +$wgSpecialPages[ 'ResourceLoaderTests' ] = 'SpecialResourceLoaderTests'; |
| 30 | + |
| 31 | +$rltResourceTemplate = array( |
| 32 | + 'localBasePath' => dirname( __FILE__ ) . '/modules', |
| 33 | + 'remoteExtPath' => 'ResourceLoaderTests/modules', |
| 34 | + 'group' => 'ext.resourceLoaderTests', |
| 35 | +); |
| 36 | +$wgResourceModules += array( |
| 37 | + 'ext.resourceLoaderTests.a' => $rltResourceTemplate + array( |
| 38 | + 'scripts' => 'ext.resourceLoaderTests.a.js', |
| 39 | + 'styles' => 'ext.resourceLoaderTests.a.css', |
| 40 | + ), |
| 41 | + 'ext.resourceLoaderTests.b' => $rltResourceTemplate + array( |
| 42 | + 'scripts' => 'ext.resourceLoaderTests.b.js', |
| 43 | + 'styles' => 'ext.resourceLoaderTests.b.css', |
| 44 | + 'dependencies' => 'ext.resourceLoaderTests.c', |
| 45 | + ), |
| 46 | + 'ext.resourceLoaderTests.c' => $rltResourceTemplate + array( |
| 47 | + 'scripts' => 'ext.resourceLoaderTests.c.js', |
| 48 | + 'styles' => 'ext.resourceLoaderTests.c.css', |
| 49 | + ), |
| 50 | +); |
Index: trunk/extensions/ResourceLoaderTests/modules/ext.resourceLoaderTests.a.css |
Property changes on: trunk/extensions/ResourceLoaderTests/modules/ext.resourceLoaderTests.a.css |
___________________________________________________________________ |
Added: svn:mime-type |
1 | 51 | + text/plain |
Index: trunk/extensions/ResourceLoaderTests/modules/ext.resourceLoaderTests.b.css |
Property changes on: trunk/extensions/ResourceLoaderTests/modules/ext.resourceLoaderTests.b.css |
___________________________________________________________________ |
Added: svn:mime-type |
2 | 52 | + text/plain |
Index: trunk/extensions/ResourceLoaderTests/modules/ext.resourceLoaderTests.c.css |
Property changes on: trunk/extensions/ResourceLoaderTests/modules/ext.resourceLoaderTests.c.css |
___________________________________________________________________ |
Added: svn:mime-type |
3 | 53 | + text/plain |
Index: trunk/extensions/ResourceLoaderTests/modules/ext.resourceLoaderTests.a.js |
— | — | @@ -0,0 +1,7 @@ |
| 2 | +console.log( 'ext.resourceLoaderTests.a' ); |
| 3 | + |
| 4 | +$( '#resourceloadertests-load-b' ).click( function() { |
| 5 | + console.log( 'loading... ext.resourceLoaderTests.b' ); |
| 6 | + mw.loader.using( 'ext.resourceLoaderTests.b', function() { console.log( 'HELLO!' ); } ); |
| 7 | + return false; |
| 8 | +} ); |
Property changes on: trunk/extensions/ResourceLoaderTests/modules/ext.resourceLoaderTests.a.js |
___________________________________________________________________ |
Added: svn:mime-type |
1 | 9 | + text/plain |
Index: trunk/extensions/ResourceLoaderTests/modules/ext.resourceLoaderTests.b.js |
— | — | @@ -0,0 +1 @@ |
| 2 | +console.log( 'ext.resourceLoaderTests.b' ); |
\ No newline at end of file |
Property changes on: trunk/extensions/ResourceLoaderTests/modules/ext.resourceLoaderTests.b.js |
___________________________________________________________________ |
Added: svn:mime-type |
1 | 3 | + text/plain |
Index: trunk/extensions/ResourceLoaderTests/modules/ext.resourceLoaderTests.c.js |
— | — | @@ -0,0 +1 @@ |
| 2 | +console.log( 'ext.resourceLoaderTests.c' ); |
\ No newline at end of file |
Property changes on: trunk/extensions/ResourceLoaderTests/modules/ext.resourceLoaderTests.c.js |
___________________________________________________________________ |
Added: svn:mime-type |
1 | 3 | + text/plain |