diff options
Diffstat (limited to 'Echo/modules/ui/mw.echo.ui.NotificationBadgeWidget.js')
-rw-r--r-- | Echo/modules/ui/mw.echo.ui.NotificationBadgeWidget.js | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Echo/modules/ui/mw.echo.ui.NotificationBadgeWidget.js b/Echo/modules/ui/mw.echo.ui.NotificationBadgeWidget.js index a07fa118..50067145 100644 --- a/Echo/modules/ui/mw.echo.ui.NotificationBadgeWidget.js +++ b/Echo/modules/ui/mw.echo.ui.NotificationBadgeWidget.js @@ -1,4 +1,4 @@ -( function ( mw, $ ) { +( function () { /** * Notification badge button widget for echo popup. * @@ -65,8 +65,8 @@ numItems: this.numItems, flags: buttonFlags, // The following messages can be used here: - // tooltip-pt-notifications-alert - // tooltip-pt-notifications-notice + // * tooltip-pt-notifications-alert + // * tooltip-pt-notifications-notice title: mw.msg( 'tooltip-pt-notifications-' + adjustedTypeString ), href: config.href } ); @@ -89,6 +89,7 @@ href: links.notifications, classes: [ 'mw-echo-ui-notificationBadgeButtonPopupWidget-footer-allnotifs' ] } ); + allNotificationsButton.$element.children().first().removeAttr( 'role' ); preferencesButton = new OO.ui.ButtonWidget( { icon: 'settings', @@ -96,6 +97,7 @@ href: links.preferences, classes: [ 'mw-echo-ui-notificationBadgeButtonPopupWidget-footer-preferences' ] } ); + preferencesButton.$element.children().first().removeAttr( 'role' ); footerButtonGroupWidget = new OO.ui.ButtonGroupWidget( { items: [ allNotificationsButton, preferencesButton ], @@ -119,8 +121,8 @@ $autoCloseIgnore: this.$element.add( this.$menuOverlay ), head: true, // The following messages can be used here: - // echo-notification-alert-text-only - // echo-notification-notice-text-only + // * echo-notification-alert-text-only + // * echo-notification-notice-text-only label: mw.msg( 'echo-notification-' + adjustedTypeString + '-text-only' @@ -165,8 +167,8 @@ this.$element .prop( 'id', 'pt-notifications-' + adjustedTypeString ) // The following classes can be used here: - // mw-echo-ui-notificationBadgeButtonPopupWidget-alert - // mw-echo-ui-notificationBadgeButtonPopupWidget-message + // * mw-echo-ui-notificationBadgeButtonPopupWidget-alert + // * mw-echo-ui-notificationBadgeButtonPopupWidget-message .addClass( 'mw-echo-ui-notificationBadgeButtonPopupWidget ' + 'mw-echo-ui-notificationBadgeButtonPopupWidget-' + adjustedTypeString @@ -240,7 +242,6 @@ unreadCount = this.manager.getUnreadCounter().getCount(); cappedUnreadCount = this.manager.getUnreadCounter().getCappedNotificationCount( unreadCount ); - cappedUnreadCount = mw.language.convertNumber( cappedUnreadCount ); badgeLabel = mw.message( 'echo-badge-count', mw.language.convertNumber( cappedUnreadCount ) ).text(); this.badgeButton.setLabel( badgeLabel ); @@ -345,4 +346,4 @@ } ); this.hasRunFirstTime = true; }; -}( mediaWiki, jQuery ) ); +}() ); |