mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 16:04:35 +00:00
Merge "Move ext.echo.logger module registration to extension.json"
This commit is contained in:
commit
536d632d14
|
@ -53,6 +53,18 @@
|
||||||
"EchoAliases": "Echo.alias.php"
|
"EchoAliases": "Echo.alias.php"
|
||||||
},
|
},
|
||||||
"ResourceModules": {
|
"ResourceModules": {
|
||||||
|
"ext.echo.logger": {
|
||||||
|
"scripts": [
|
||||||
|
"logger/mw.echo.Logger.js"
|
||||||
|
],
|
||||||
|
"dependencies": [
|
||||||
|
"oojs"
|
||||||
|
],
|
||||||
|
"targets": [
|
||||||
|
"desktop",
|
||||||
|
"mobile"
|
||||||
|
]
|
||||||
|
},
|
||||||
"ext.echo.ui.desktop": {
|
"ext.echo.ui.desktop": {
|
||||||
"scripts": [
|
"scripts": [
|
||||||
"ui/mw.echo.ui.BadgeLinkWidget.js",
|
"ui/mw.echo.ui.BadgeLinkWidget.js",
|
||||||
|
|
|
@ -143,22 +143,6 @@ class EchoHooks {
|
||||||
* @param ResourceLoader &$resourceLoader
|
* @param ResourceLoader &$resourceLoader
|
||||||
*/
|
*/
|
||||||
public static function onResourceLoaderRegisterModules( ResourceLoader &$resourceLoader ) {
|
public static function onResourceLoaderRegisterModules( ResourceLoader &$resourceLoader ) {
|
||||||
// ext.echo.logger is used by mobile notifications as well, so be sure not to add any
|
|
||||||
// dependencies that do not target mobile.
|
|
||||||
$definition = [
|
|
||||||
'scripts' => [
|
|
||||||
'logger/mw.echo.Logger.js',
|
|
||||||
],
|
|
||||||
'dependencies' => [
|
|
||||||
'oojs'
|
|
||||||
],
|
|
||||||
'localBasePath' => dirname( __DIR__ ) . '/modules',
|
|
||||||
'remoteExtPath' => 'Echo/modules',
|
|
||||||
'targets' => [ 'desktop', 'mobile' ],
|
|
||||||
];
|
|
||||||
|
|
||||||
$resourceLoader->register( 'ext.echo.logger', $definition );
|
|
||||||
|
|
||||||
global $wgExtensionDirectory, $wgEchoNotificationIcons, $wgEchoSecondaryIcons;
|
global $wgExtensionDirectory, $wgEchoNotificationIcons, $wgEchoSecondaryIcons;
|
||||||
$resourceLoader->register( 'ext.echo.emailicons', [
|
$resourceLoader->register( 'ext.echo.emailicons', [
|
||||||
'class' => 'ResourceLoaderEchoImageModule',
|
'class' => 'ResourceLoaderEchoImageModule',
|
||||||
|
|
Loading…
Reference in a new issue