MinervaNeue/resources/skins.minerva.scripts/page-issues/overlay/IssueList.js
Stephen Niedzielski 66c44402d7 Hygiene: replace OO.mfExtend with mobile.mfExtend
Use the mobile.startup module mfExtend export directly instead of
OO. This will allow MobileFrontend to reduce its exposed API.

Bug: T208915
Depends-On: Idededf132f724176c38c5e0a7c9327f00489a09d
Change-Id: Id582325c830c229240b88cf4e151afea48fea750
2019-02-08 21:42:03 +00:00

34 lines
732 B
JavaScript

( function ( M ) {
var
mobile = M.require( 'mobile.startup' ),
mfExtend = mobile.mfExtend,
View = mobile.View,
IssueNotice = M.require( 'skins.minerva.scripts/IssueNotice' );
/**
* IssueList
* @class IssueList
* @extends View
*
* @param {IssueSummary} issues
*/
function IssueList( issues ) {
this.issues = issues;
View.call( this, { className: 'cleanup' } );
}
mfExtend( IssueList, View, {
tagName: 'ul',
postRender: function () {
View.prototype.postRender.apply( this, arguments );
this.append(
this.issues.map( function ( issue ) {
return new IssueNotice( issue ).$el;
} )
);
}
} );
M.define( 'skins.minerva.scripts/IssueList', IssueList );
}( mw.mobileFrontend ) );