mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-12-19 01:01:00 +00:00
ab1b4873df
In ES5 you can override getters via prototype but not with ES6. Rather than patch MobileFrontend just for this use case its easier to patch Minerva. Bug: T380314 Change-Id: I69ccdb93287dc5e080a0d5a8faa9d208dc67779d
36 lines
533 B
JavaScript
36 lines
533 B
JavaScript
const
|
|
mobile = require( 'mobile.startup' ),
|
|
View = mobile.View,
|
|
IssueNotice = require( './IssueNotice.js' );
|
|
|
|
/**
|
|
* IssueList
|
|
*
|
|
* @class
|
|
* @ignore
|
|
* @extends View
|
|
*
|
|
* @param {IssueSummary} issues
|
|
*/
|
|
class IssueList extends View {
|
|
constructor( issues ) {
|
|
super( {
|
|
className: 'cleanup',
|
|
issues
|
|
} );
|
|
}
|
|
|
|
get tagName() {
|
|
return 'ul';
|
|
}
|
|
|
|
postRender() {
|
|
super.postRender();
|
|
this.append(
|
|
( this.options.issues || [] ).map( ( issue ) => new IssueNotice( issue ).$el )
|
|
);
|
|
}
|
|
}
|
|
|
|
module.exports = IssueList;
|