mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-15 10:27:31 +00:00
ef5003f310
The MobileFrontend dependency in Minerva is problematic. Code that Minerva needs should live in core. MobileFrontend should load code on all skins when they operate on a mobile domain. This eslint check reminds developers of this in a hope it encourages more upstreaming to core when possible. Of course disabling is also an option, but this check will at least make us aware of when we are moving further away from the goal. Change-Id: I62183c9aefc81053e4ad81fb746decef2dd24b44
36 lines
737 B
JavaScript
36 lines
737 B
JavaScript
( function ( M ) {
|
|
var
|
|
mobile = M.require( 'mobile.startup' ),
|
|
mfExtend = mobile.mfExtend,
|
|
View = mobile.View,
|
|
IssueNotice = require( './IssueNotice.js' );
|
|
|
|
/**
|
|
* IssueList
|
|
* @class IssueList
|
|
* @extends View
|
|
*
|
|
* @param {IssueSummary} issues
|
|
*/
|
|
function IssueList( issues ) {
|
|
this.issues = issues;
|
|
View.call( this, { className: 'cleanup' } );
|
|
}
|
|
|
|
mfExtend( IssueList, View, {
|
|
tagName: 'ul',
|
|
postRender: function () {
|
|
View.prototype.postRender.apply( this, arguments );
|
|
this.append(
|
|
this.issues.map( function ( issue ) {
|
|
return new IssueNotice( issue ).$el;
|
|
} )
|
|
);
|
|
}
|
|
} );
|
|
|
|
module.exports = IssueList;
|
|
|
|
// eslint-disable-next-line no-restricted-properties
|
|
}( mw.mobileFrontend ) );
|