mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 16:04:35 +00:00
Merge "Hide 'mark as read' for foreign NotificationGroupItem bundles"
This commit is contained in:
commit
c826294f30
|
@ -22,6 +22,11 @@
|
|||
OO.ui.mixin.GroupWidget.call( this, config );
|
||||
OO.ui.mixin.PendingElement.call( this, config );
|
||||
|
||||
// Hide the [x] mark as read button for foreign notifications
|
||||
if ( this.getModel().isForeign() ) {
|
||||
this.markAsReadButton.toggle( false );
|
||||
}
|
||||
|
||||
this.setPendingElement( this.$group );
|
||||
this.$group
|
||||
.addClass( 'mw-echo-ui-notificationGroupItemWidget-group' )
|
||||
|
@ -229,6 +234,19 @@
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
mw.echo.ui.NotificationGroupItemWidget.prototype.toggleRead = function ( read ) {
|
||||
// Parent method
|
||||
mw.echo.ui.NotificationGroupItemWidget.parent.toggleRead.call( this, read );
|
||||
|
||||
if ( this.getModel().isForeign() ) {
|
||||
// Never show the [x] mark-all-unread button for foreign bundles
|
||||
this.markAsReadButton.toggle( false );
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Check whether the titles should be shown and toggle them in the items.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue