{
$overlay: this.$overlay,
collapsed: config.collapsed,
- $wrapper: this.$wrapper
+ $wrapper: this.$wrapper,
+ isMobile: OO.ui.isMobile()
}
);
this.showNewChangesLink = new OO.ui.ButtonWidget( {
icon: 'reload',
framed: false,
- label: mw.msg( 'rcfilters-show-new-changes' ),
flags: [ 'progressive' ],
classes: [ 'mw-rcfilters-ui-filterWrapperWidget-showNewChanges' ]
} );
.addClass( 'mw-rcfilters-ui-filterWrapperWidget-top' );
$bottom = $( '<div>' )
- .addClass( 'mw-rcfilters-ui-filterWrapperWidget-bottom' )
+ .addClass( OO.ui.isMobile() ?
+ 'mw-rcfilters-ui-filterWrapperWidget-bottom ' +
+ 'mw-rcfilters-ui-filterWrapperWidget-bottom-mobile' :
+ 'mw-rcfilters-ui-filterWrapperWidget-bottom'
+ )
.append(
this.showNewChangesLink.$element,
this.numChangesAndDateWidget.$element
* @param {boolean} newChangesExist Whether new changes exist
*/
FilterWrapperWidget.prototype.onNewChangesExist = function ( newChangesExist ) {
+ if ( newChangesExist ) {
+ this.showNewChangesLink.setLabel(
+ mw.message(
+ 'rcfilters-show-new-changes',
+ this.changesListModel.getNextFromFormatted()
+ ).text()
+ );
+ }
this.showNewChangesLink.toggle( newChangesExist );
};