2018-11-24 01:49:47 +00:00
|
|
|
( function ( M ) {
|
2019-02-08 17:04:26 +00:00
|
|
|
var
|
|
|
|
mobile = M.require( 'mobile.startup' ),
|
|
|
|
mfExtend = mobile.mfExtend,
|
|
|
|
View = mobile.View,
|
2019-07-02 21:10:10 +00:00
|
|
|
IssueNotice = require( './IssueNotice.js' );
|
2018-11-24 01:49:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* IssueList
|
|
|
|
* @class IssueList
|
|
|
|
* @extends View
|
|
|
|
*
|
|
|
|
* @param {IssueSummary} issues
|
|
|
|
*/
|
|
|
|
function IssueList( issues ) {
|
|
|
|
this.issues = issues;
|
|
|
|
View.call( this, { className: 'cleanup' } );
|
|
|
|
}
|
|
|
|
|
2019-02-08 17:04:26 +00:00
|
|
|
mfExtend( IssueList, View, {
|
2018-11-24 01:49:47 +00:00
|
|
|
tagName: 'ul',
|
|
|
|
postRender: function () {
|
|
|
|
View.prototype.postRender.apply( this, arguments );
|
|
|
|
this.append(
|
|
|
|
this.issues.map( function ( issue ) {
|
|
|
|
return new IssueNotice( issue ).$el;
|
|
|
|
} )
|
|
|
|
);
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2019-07-02 21:10:10 +00:00
|
|
|
module.exports = IssueList;
|
2018-11-24 01:49:47 +00:00
|
|
|
}( mw.mobileFrontend ) );
|