Hygiene: replace OO.mfExtend with mobile.mfExtend

Use the mobile.startup module mfExtend export directly instead of
OO. This will allow MobileFrontend to reduce its exposed API.

Bug: T208915
Depends-On: Idededf132f724176c38c5e0a7c9327f00489a09d
Change-Id: Id582325c830c229240b88cf4e151afea48fea750
This commit is contained in:
Stephen Niedzielski 2019-02-08 10:04:26 -07:00 committed by Niedzielski
parent 28b0aa441d
commit 66c44402d7
5 changed files with 16 additions and 7 deletions

View File

@ -1,6 +1,7 @@
( function ( M ) {
var
mobile = M.require( 'mobile.startup' ),
mfExtend = mobile.mfExtend,
View = mobile.View,
util = mobile.util,
Icon = mobile.Icon,
@ -43,7 +44,7 @@
this.setCount( count );
}
OO.mfExtend( NotificationBadge, View, {
mfExtend( NotificationBadge, View, {
/**
* @cfg {object} defaults Default options hash.
* @cfg {string} defaults.notificationIconClass e.g. mw-ui-icon for icon

View File

@ -1,6 +1,7 @@
( function ( M ) {
var
mobile = M.require( 'mobile.startup' ),
mfExtend = mobile.mfExtend,
View = mobile.View,
util = mobile.util;
@ -19,7 +20,7 @@
);
}
OO.mfExtend( BackToTopOverlay, View, {
mfExtend( BackToTopOverlay, View, {
template: mw.template.get( 'skins.minerva.options', 'BackToTopOverlay.hogan' ),
/**

View File

@ -1,6 +1,7 @@
( function ( M ) {
var
mobile = M.require( 'mobile.startup' ),
mfExtend = mobile.mfExtend,
browser = mobile.Browser.getSingleton(),
View = mobile.View;
@ -16,7 +17,7 @@
View.call( this, options );
}
OO.mfExtend( MainMenu, View, {
mfExtend( MainMenu, View, {
isTemplateMode: true,
template: mw.template.get( 'skins.minerva.scripts', 'menu.hogan' ),
templatePartials: {

View File

@ -1,5 +1,8 @@
( function ( M ) {
var View = M.require( 'mobile.startup' ).View,
var
mobile = M.require( 'mobile.startup' ),
mfExtend = mobile.mfExtend,
View = mobile.View,
IssueNotice = M.require( 'skins.minerva.scripts/IssueNotice' );
/**
@ -14,7 +17,7 @@
View.call( this, { className: 'cleanup' } );
}
OO.mfExtend( IssueList, View, {
mfExtend( IssueList, View, {
tagName: 'ul',
postRender: function () {
View.prototype.postRender.apply( this, arguments );

View File

@ -1,5 +1,8 @@
( function ( M ) {
var View = M.require( 'mobile.startup' ).View;
var
mobile = M.require( 'mobile.startup' ),
mfExtend = mobile.mfExtend,
View = mobile.View;
/**
* IssueNotice
@ -11,7 +14,7 @@
function IssueNotice( props ) {
View.call( this, props );
}
OO.mfExtend( IssueNotice, View, {
mfExtend( IssueNotice, View, {
tagName: 'li',
template: mw.template.get( 'skins.minerva.scripts', 'IssueNotice.hogan' ),
postRender: function () {