The newly introduced $wgResourceModuleSkinStyles global enables skins to
provide additional stylesheets to existing ResourceLoader module.
This both makes it easier (or at all possible) to override default
styles and lowers the style footprint by making it possible not to
load styles unused on most pages.
----
Example:
Use the file 'foo-styles.css' for the 'mediawiki.foo' module when using
the MySkin skin:
$wgResourceModuleSkinStyles['myskin'] = array(
'mediawiki.foo' => 'foo-styles.css',
'remoteSkinPath' => 'MySkin',
'localBasePath' => __DIR__,
);
For detailed documentation, see the doc comment in DefaultSettings.php.
For a practical usage example, see Vector.php.
----
Implementation notes:
* The values defined in $wgResourceModuleSkinStyles are embedded into
the modules as late as possible (in ResourceLoader::register()).
* Only plain file modules are supported, setting module skin styles
for other module types has no effect.
* ResourceLoader and ResourceLoaderFileModule now support loading
files from arbitrary paths to make this possible, defined using
ResourceLoaderFilePath objects.
* This required some adjustments in seemingly unrelated places for
code which didn't handle the paths fully correctly before.
* ResourceLoader and ResourceLoaderFileModule are now a bit more
tightly coupled than before :(
* Included a tiny example change for the Vector skin, a lot more of
similar cleanup is possible and planned for the future.
* Many of the non-essential mediawiki.* modules defined in
Resources.php should be using `'skinStyles' => array( 'default' => … )`
instead of `'styles' => …` to allow more customizations, this is
also planned for the future after auditing which ones would actually
benefit from this.
Change-Id: Ica4ff9696b490e35f60288d7ce1295766c427e87
- Removed spaces after not operator (!)
- Removed spaces inside array index
- use tab as indent instead of spaces
- Add newline at end of file
- Removed spaces after casts
Change-Id: I9ba17c4385fcb43d38998d45f89cf42952bc791b
Whenever module A depends on module B, module B must exist.
Whenever module A depends on module B, the possible targets of A must
be a subset of targets of module B.
Bug: 64513
Change-Id: I9de291d20d08df2813eb55be9a1f7e5efd907d6f
phpunit interprets '@author' documentation statements to generate group.
Appending the year to the author name created duplicates entry:
$ php phpunit.php --list-groups|grep Antoine
Antoine Musso
Antoine Musso, 2012
$
Removing the date fix the duplication. I have also inserted
corresponding '@copyright' statements.
Change-Id: I65b19adb59c4894314ce68a0c815c5d3e4c30df0
The ResourcesTest class under ./resources/ were not registered anywhere.
This patch move it under the `structure` testsuite and phaseout the, now
empty, `resources` directory.
Change-Id: I53410e1dc83263c4c541f4dc278a9e616265d7b1
2013-05-30 17:17:46 +02:00
Renamed from tests/phpunit/resources/ResourcesTest.php (Browse further)