mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-23 15:36:58 +00:00
Echo should fire onInitialize event after rendering of badge
This allows skins to make modifications to the final output. This will be used in Vector to make the Echo icon consistent with other icons. Bug: T257143 Change-Id: I9fe8c921956ede164d93cb1f42647cf4b80ca976
This commit is contained in:
parent
6bbba65667
commit
2e58065ddf
|
@ -19,6 +19,9 @@ were fetched from the API.
|
|||
* types: Notifications type that the badge represents. Can be 'message', 'alert' or 'all'
|
||||
* controller: The instance of the controller responsible for the specific popup operations
|
||||
|
||||
'ext.echo.NotificationBadgeWidget.onInitialize': Fired when the badge is initialized
|
||||
* badge: Instance of mw.echo.ui.NotificationBadgeWidget
|
||||
|
||||
'ext.echo.special.onInitialize': Fired when the special page is initialized. Note that this
|
||||
is also fired whenever the special page notification display is changed, like when clicking
|
||||
a filter, changing pagination, or viewing notifications for a remote wiki or page.
|
||||
|
|
|
@ -174,6 +174,7 @@
|
|||
'mw-echo-ui-notificationBadgeButtonPopupWidget-' + adjustedTypeString
|
||||
)
|
||||
.append( this.badgeButton.$element );
|
||||
mw.hook( 'ext.echo.NotificationBadgeWidget.onInitialize' ).fire( this );
|
||||
};
|
||||
|
||||
/* Initialization */
|
||||
|
|
Loading…
Reference in a new issue