mediawiki-skins-MinervaNeue/resources/skins.minerva.scripts/page-issues/overlay/IssueList.js
Jon Robson ab1b4873df Migrate page issue overlay to ES6 to fix display
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
2024-12-04 17:32:03 -08:00

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;