Allow mark as read for a cross-wiki bundle

Bug: T128562
Change-Id: I14b4885569d9d78072ae76bc9cdefd41741a435b
This commit is contained in:
Moriel Schottlender 2016-03-02 16:04:04 -08:00
parent 2010c435e6
commit ae04c0e4e6
2 changed files with 1 additions and 19 deletions

View file

@ -22,11 +22,6 @@
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.toggleMarkAsReadButtons( false );
}
this.setPendingElement( this.$group );
this.$group
.addClass( 'mw-echo-ui-notificationGroupItemWidget-group' )
@ -234,19 +229,6 @@
}
};
/**
* @inheritdoc
*/
mw.echo.ui.NotificationGroupItemWidget.prototype.toggleRead = function ( read ) {
// Parent method
mw.echo.ui.NotificationGroupItemWidget.parent.prototype.toggleRead.call( this, read );
if ( this.getModel().isForeign() ) {
// Never show the [x] mark-all-unread button for foreign bundles
this.toggleMarkAsReadButtons( false );
}
};
/**
* Check whether the titles should be shown and toggle them in the items.
*/

View file

@ -168,7 +168,7 @@
} else {
// Create a fake resolved promise for models that already
// have items in them
promise = $.Deferred().resolve();
promise = $.Deferred().resolve( notifModels[ i ].getAllItemIds() );
}
// For each of those, mark items as read in the UI and API