Merge "Split up ext.echo.nojs into badge and notifications styles"

This commit is contained in:
jenkins-bot 2015-09-17 21:51:17 +00:00 committed by Gerrit Code Review
commit 0dab0df15c
3 changed files with 15 additions and 7 deletions

View file

@ -596,7 +596,7 @@ class EchoHooks {
$out->addModules( array( 'ext.echo.init' ) );
// Load the styles for the Notifications badge
$out->addModuleStyles( array(
'ext.echo.nojs',
'ext.echo.styles.badge',
'ext.echo.badgeicons'
) );
}
@ -728,7 +728,7 @@ class EchoHooks {
) {
$personal_urls['mytalk']['text'] = $sk->msg( 'echo-new-messages' )->text();
$personal_urls['mytalk']['class'] = array( 'mw-echo-alert' );
$sk->getOutput()->addModuleStyles( 'ext.echo.nojs.alert' );
$sk->getOutput()->addModuleStyles( 'ext.echo.styles.alert' );
}
return true;

View file

@ -53,7 +53,8 @@ $wgResourceModules += array(
)
),
'dependencies' => array(
'ext.echo.nojs',
'ext.echo.styles.badge',
'ext.echo.styles.notifications',
'ext.echo.dm',
'oojs-ui',
'ext.echo.logger',
@ -111,15 +112,22 @@ $wgResourceModules += array(
'targets' => array( 'desktop' ),
),
// Base no-js styles
'ext.echo.nojs' => $echoResourceTemplate + array(
'ext.echo.styles.badge' => $echoResourceTemplate + array(
'position' => 'top',
'styles' => array(
'nojs/mw.echo.badge.less',
),
'targets' => array( 'desktop', 'mobile' ),
),
// Styles for individual notification entries in flyout and Special:Notifications
'ext.echo.styles.notifications' => $echoResourceTemplate + array(
'position' => 'top',
'styles' => array(
'nojs/mw.echo.notifications.less'
),
'targets' => array( 'desktop', 'mobile' ),
),
'ext.echo.nojs.alert' => $echoResourceTemplate + array(
'ext.echo.styles.alert' => $echoResourceTemplate + array(
'position' => 'top',
'styles' => array(
'nojs/mw.echo.alert.less',
@ -134,7 +142,7 @@ $wgResourceModules += array(
),
'targets' => array( 'desktop', 'mobile' ),
),
'ext.echo.nojs.special' => $echoResourceTemplate + array(
'ext.echo.styles.special' => $echoResourceTemplate + array(
'position' => 'top',
'styles' => array(
'nojs/mw.echo.special.less',

View file

@ -134,7 +134,7 @@ class SpecialNotifications extends SpecialPage {
)
);
// For no-js support
$out->addModuleStyles( array( 'ext.echo.nojs', 'ext.echo.nojs.special' ) );
$out->addModuleStyles( array( 'ext.echo.styles.notifications', 'ext.echo.styles.special' ) );
DeferredUpdates::addCallableUpdate( function() use ( $user, $echoSeenTime, $unread ) {
// Mark items as read