mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-23 23:44:53 +00:00
d9e2695c7b
Get rid of $mobileReadyTemplate, it's only used once now, and unset $echoResourceTemplate after usage. Change-Id: Ie371a6c1545383b8be1c0b99730228da6e381650
109 lines
3 KiB
PHP
109 lines
3 KiB
PHP
<?php
|
|
/**
|
|
* MediaWiki Extension: Echo
|
|
* http://www.mediawiki.org/wiki/Extension:Echo
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
* in the Software without restriction, including without limitation the rights
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
* furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*
|
|
* This program is distributed WITHOUT ANY WARRANTY.
|
|
*/
|
|
|
|
/**
|
|
*
|
|
* @file
|
|
* @ingroup Extensions
|
|
* @author Andrew Garrett, Benny Situ, Ryan Kaldari, Erik Bernhardson
|
|
* @licence MIT License
|
|
*/
|
|
|
|
$echoResourceTemplate = array(
|
|
'localBasePath' => __DIR__ . '/modules',
|
|
'remoteExtPath' => 'Echo/modules',
|
|
);
|
|
|
|
$wgResourceModules += array(
|
|
// ext.echo.base is registered in EchoHooks::onResourceLoaderRegisterModules
|
|
'ext.echo.overlay' => $echoResourceTemplate + array(
|
|
'scripts' => array(
|
|
'overlay/ext.echo.overlay.js',
|
|
),
|
|
'skinStyles' => array(
|
|
'modern' => 'overlay/ext.echo.overlay.modern.css',
|
|
'monobook' => 'overlay/ext.echo.overlay.monobook.css',
|
|
),
|
|
'dependencies' => array(
|
|
'mediawiki.util',
|
|
'mediawiki.language',
|
|
'mediawiki.ui.anchor',
|
|
'ext.echo.base',
|
|
'mediawiki.api',
|
|
'mediawiki.jqueryMsg',
|
|
),
|
|
'messages' => array(
|
|
'echo-overlay-link',
|
|
'echo-mark-all-as-read',
|
|
'echo-more-info',
|
|
'echo-feedback',
|
|
'echo-notification-alert',
|
|
'echo-notification-message',
|
|
'echo-notification-alert-text-only',
|
|
'echo-notification-message-text-only',
|
|
'echo-email-batch-bullet'
|
|
),
|
|
'targets' => array( 'desktop', 'mobile' ),
|
|
),
|
|
'ext.echo.overlay.init' => $echoResourceTemplate + array(
|
|
'styles' => array(
|
|
'overlay/ext.echo.overlay.less',
|
|
),
|
|
'dependencies' => array(
|
|
'ext.echo.overlay',
|
|
),
|
|
'scripts' => array(
|
|
'overlay/ext.echo.overlay.init.js',
|
|
),
|
|
),
|
|
'ext.echo.special' => $echoResourceTemplate + array(
|
|
'scripts' => array(
|
|
'special/ext.echo.special.js',
|
|
),
|
|
'styles' => 'special/ext.echo.special.less',
|
|
'dependencies' => array(
|
|
'mediawiki.ui.button',
|
|
'ext.echo.base',
|
|
),
|
|
'messages' => array(
|
|
'echo-load-more-error',
|
|
'echo-more-info',
|
|
'echo-feedback',
|
|
),
|
|
'position' => 'top',
|
|
),
|
|
'ext.echo.alert' => $echoResourceTemplate + array(
|
|
'position' => 'top',
|
|
'styles' => 'alert/ext.echo.alert.less',
|
|
'skinStyles' => array(
|
|
'modern' => 'alert/ext.echo.alert.modern.css',
|
|
'monobook' => 'alert/ext.echo.alert.monobook.css',
|
|
),
|
|
),
|
|
'ext.echo.badge' => $echoResourceTemplate + array(
|
|
'position' => 'top',
|
|
'styles' => 'badge/ext.echo.badge.less',
|
|
'skinStyles' => array(
|
|
'modern' => 'badge/ext.echo.badge.modern.css',
|
|
'monobook' => 'badge/ext.echo.badge.monobook.css',
|
|
),
|
|
),
|
|
);
|
|
|
|
unset( $echoResourceTemplate );
|