mediawiki-skins-MinervaNeue/resources/skins.minerva.scripts/page-issues/overlay/IssueNotice.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

34 lines
531 B
JavaScript

const
mobile = require( 'mobile.startup' ),
View = mobile.View;
/**
* IssueNotice
*
* @class
* @ignore
* @extends View
*
* @param {IssueSummary} props
*/
class IssueNotice extends View {
constructor( props ) {
super( props );
}
get tagName() {
return 'li';
}
get template() {
return mw.template.get( 'skins.minerva.scripts', 'IssueNotice.mustache' );
}
postRender() {
super.postRender();
this.$el.find( '.issue-notice' ).prepend( this.options.issue.iconElement );
}
}
module.exports = IssueNotice;