| 1 |
( function () { |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
mw.echo.ui.ClonedNotificationItemWidget = function MwEchoUiClonedNotificationItemWidget( $element, config ) { |
| 19 |
config = config || {}; |
| 20 |
|
| 21 |
|
| 22 |
mw.echo.ui.ClonedNotificationItemWidget.super.call( this, config ); |
| 23 |
|
| 24 |
this.$element = $element; |
| 25 |
this.timestamp = config.timestamp || moment.utc().format( 'YYYY-MM-DD[T]HH:mm:ss[Z]' ); |
| 26 |
this.read = !!config.read; |
| 27 |
this.foreign = config.foreign === undefined ? true : config.foreign; |
| 28 |
this.id = config.id; |
| 29 |
|
| 30 |
this.$element.addClass( 'mw-echo-ui-clonedNotificationItemWidget' ); |
| 31 |
}; |
| 32 |
|
| 33 |
|
| 34 |
OO.inheritClass( mw.echo.ui.ClonedNotificationItemWidget, OO.ui.Widget ); |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
mw.echo.ui.ClonedNotificationItemWidget.prototype.getTimestamp = function () { |
| 42 |
return this.timestamp; |
| 43 |
}; |
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
mw.echo.ui.ClonedNotificationItemWidget.prototype.isRead = function () { |
| 51 |
return this.read; |
| 52 |
}; |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
mw.echo.ui.ClonedNotificationItemWidget.prototype.getId = function () { |
| 60 |
return this.id; |
| 61 |
}; |
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
mw.echo.ui.ClonedNotificationItemWidget.prototype.isForeign = function () { |
| 69 |
return this.foreign; |
| 70 |
}; |
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
mw.echo.ui.ClonedNotificationItemWidget.prototype.isFake = function () { |
| 78 |
return true; |
| 79 |
}; |
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
mw.echo.ui.ClonedNotificationItemWidget.prototype.resetInitiallyUnseen = function () { |
| 85 |
}; |
| 86 |
|
| 87 |
}() ); |