mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-23 15:36:58 +00:00
Merge "Consistent Casing for "iconUrl""
This commit is contained in:
commit
1b4ba9a09c
|
@ -18,7 +18,7 @@ class EchoFlyoutFormatter extends EchoEventFormatter {
|
|||
'img',
|
||||
[
|
||||
'class' => 'mw-echo-icon',
|
||||
'src' => $this->getIconURL( $model ),
|
||||
'src' => $this->getIconUrl( $model ),
|
||||
]
|
||||
);
|
||||
|
||||
|
@ -70,7 +70,7 @@ class EchoFlyoutFormatter extends EchoEventFormatter {
|
|||
);
|
||||
}
|
||||
|
||||
private function getIconURL( EchoEventPresentationModel $model ) {
|
||||
private function getIconUrl( EchoEventPresentationModel $model ) {
|
||||
return EchoIcon::getUrl(
|
||||
$model->getIconType(),
|
||||
$this->language->getDir()
|
||||
|
|
|
@ -23,7 +23,7 @@ class SpecialNotificationsFormatter extends EchoEventFormatter {
|
|||
'img',
|
||||
[
|
||||
'class' => 'mw-echo-icon',
|
||||
'src' => $this->getIconURL( $model ),
|
||||
'src' => $this->getIconUrl( $model ),
|
||||
]
|
||||
);
|
||||
|
||||
|
@ -112,7 +112,7 @@ class SpecialNotificationsFormatter extends EchoEventFormatter {
|
|||
);
|
||||
}
|
||||
|
||||
private function getIconURL( EchoEventPresentationModel $model ) {
|
||||
private function getIconUrl( EchoEventPresentationModel $model ) {
|
||||
return EchoIcon::getUrl(
|
||||
$model->getIconType(),
|
||||
$this->language->getDir()
|
||||
|
|
|
@ -391,7 +391,7 @@
|
|||
compactHeader: content.compactHeader,
|
||||
body: content.body
|
||||
},
|
||||
iconURL: content.iconUrl,
|
||||
iconUrl: content.iconUrl,
|
||||
iconType: content.icon,
|
||||
primaryUrl: OO.getProp( content.links, 'primary', 'url' ),
|
||||
secondaryUrls: OO.getProp( content.links, 'secondary' ) || [],
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
// bundled notifications use the compact header and do not have icons
|
||||
bundledNotificationModels.forEach( ( bundled ) => {
|
||||
bundled.content.header = bundled.content.compactHeader;
|
||||
delete bundled.iconURL;
|
||||
delete bundled.iconUrl;
|
||||
} );
|
||||
|
||||
this.list = new mw.echo.dm.NotificationsList();
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
this.bundled = !!config.bundled;
|
||||
this.source = config.source || '';
|
||||
this.iconType = config.iconType;
|
||||
this.iconURL = config.iconURL;
|
||||
this.iconUrl = config.iconUrl;
|
||||
|
||||
this.read = !!config.read;
|
||||
this.seen = !!config.seen;
|
||||
|
@ -242,8 +242,8 @@
|
|||
*
|
||||
* @return {string} Notification icon URL
|
||||
*/
|
||||
mw.echo.dm.NotificationItem.prototype.getIconURL = function () {
|
||||
return this.iconURL;
|
||||
mw.echo.dm.NotificationItem.prototype.getIconUrl = function () {
|
||||
return this.iconUrl;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
} );
|
||||
|
||||
let $icon;
|
||||
const iconUrl = this.model.getIconURL();
|
||||
const iconUrl = this.model.getIconUrl();
|
||||
// Icon
|
||||
if ( iconUrl ) {
|
||||
// Only invert non colored images
|
||||
|
@ -52,7 +52,7 @@
|
|||
$icon = $( '<div>' )
|
||||
.addClass( `mw-echo-ui-notificationItemWidget-icon ${ invertIconClass }` )
|
||||
.append( $( '<img>' ).attr( {
|
||||
src: this.model.getIconURL(),
|
||||
src: this.model.getIconUrl(),
|
||||
role: 'presentation',
|
||||
alt: ' '
|
||||
} ) );
|
||||
|
|
|
@ -80,7 +80,7 @@ QUnit.module( 'ext.echo.dm - NotificationItem', ( hooks ) => {
|
|||
isBundled: false,
|
||||
getTimestamp: nowFormatted,
|
||||
getPrimaryUrl: undefined,
|
||||
getIconURL: undefined,
|
||||
getIconUrl: undefined,
|
||||
getIconType: undefined,
|
||||
getSecondaryUrls: [],
|
||||
getModelName: 'local',
|
||||
|
|
Loading…
Reference in a new issue