From 35e782c3d8987d1f0171f7830b59e922b0e4aa09 Mon Sep 17 00:00:00 2001 From: Stephane Bisson Date: Wed, 13 Jul 2016 09:51:51 -0400 Subject: [PATCH] Add tooltips to page filters Bug: T139644 Change-Id: I6ae0d0e8c6c7dd79b9ab00db1d601f670764d3a4 --- modules/ui/mw.echo.ui.PageFilterWidget.js | 2 ++ modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js | 3 +++ 2 files changed, 5 insertions(+) diff --git a/modules/ui/mw.echo.ui.PageFilterWidget.js b/modules/ui/mw.echo.ui.PageFilterWidget.js index b7b8d8fd0..aa76f0fd6 100644 --- a/modules/ui/mw.echo.ui.PageFilterWidget.js +++ b/modules/ui/mw.echo.ui.PageFilterWidget.js @@ -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', diff --git a/modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js b/modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js index e3283f4e5..932d54e33 100644 --- a/modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js +++ b/modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js @@ -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