2023-11-07 16:29:17 +00:00
|
|
|
const
|
|
|
|
mobile = require( 'mobile.startup' ),
|
|
|
|
View = mobile.View,
|
|
|
|
IssueNotice = require( './IssueNotice.js' );
|
2018-11-24 01:49:47 +00:00
|
|
|
|
2023-11-07 16:29:17 +00:00
|
|
|
/**
|
|
|
|
* IssueList
|
|
|
|
*
|
|
|
|
* @class IssueList
|
|
|
|
* @extends View
|
|
|
|
*
|
|
|
|
* @param {IssueSummary} issues
|
|
|
|
*/
|
|
|
|
function IssueList( issues ) {
|
|
|
|
this.issues = issues;
|
|
|
|
View.call( this, { className: 'cleanup' } );
|
|
|
|
}
|
|
|
|
OO.inheritClass( IssueList, View );
|
|
|
|
IssueList.prototype.tagName = 'ul';
|
|
|
|
IssueList.prototype.postRender = function () {
|
|
|
|
View.prototype.postRender.apply( this, arguments );
|
|
|
|
this.append(
|
|
|
|
( this.issues || [] ).map( function ( issue ) {
|
|
|
|
return new IssueNotice( issue ).$el;
|
|
|
|
} )
|
|
|
|
);
|
|
|
|
};
|
|
|
|
module.exports = IssueList;
|