Add tooltips to page filters

Bug: T139644
Change-Id: I6ae0d0e8c6c7dd79b9ab00db1d601f670764d3a4
This commit is contained in:
Stephane Bisson 2016-07-13 09:51:51 -04:00
parent 0218ac804d
commit 35e782c3d8
2 changed files with 5 additions and 0 deletions

View file

@ -33,6 +33,7 @@
// Title option
this.title = new mw.echo.ui.PageNotificationsOptionWidget( {
label: config.title,
title: config.title,
unreadCount: this.totalCount,
data: null,
classes: [ 'mw-echo-ui-pageFilterWidget-title' ]
@ -78,6 +79,7 @@
for ( i = 0; i < sourcePages.length; i++ ) {
widget = new mw.echo.ui.PageNotificationsOptionWidget( {
label: sourcePages[ i ].title,
title: sourcePages[ i ].title,
// TODO: Pages that are a user page should
// have a user icon
icon: 'article',

View file

@ -5,6 +5,7 @@
* @class
* @extends OO.ui.OptionWidget
* @mixins OO.ui.mixin.IconElement
* @mixins OO.ui.mixin.TitledElement
*
* @constructor
* @param {Object} [config] Configuration object
@ -17,6 +18,7 @@
mw.echo.ui.PageNotificationsOptionWidget.parent.call( this, config );
// Mixin constructors
OO.ui.mixin.IconElement.call( this, config );
OO.ui.mixin.TitledElement.call( this, config );
this.count = config.unreadCount || 0;
@ -53,6 +55,7 @@
OO.inheritClass( mw.echo.ui.PageNotificationsOptionWidget, OO.ui.OptionWidget );
OO.mixinClass( mw.echo.ui.PageNotificationsOptionWidget, OO.ui.mixin.IconElement );
OO.mixinClass( mw.echo.ui.PageNotificationsOptionWidget, OO.ui.mixin.TitledElement );
/**
* Set the page count