Remove MWMobileSurface & Context

The hacks contained within context were ancient and no
longer used, and thanks to a typo in mw.MobileArticleTarget
neither of these classes was being used anyway.

Change-Id: I52f2b6d5aa5ddbcc45ac6107eaf9407570b73672
This commit is contained in:
Ed Sanders 2017-01-19 13:03:28 +00:00 committed by Jforrester
parent 1ae5c13cb9
commit e5555d6d85
3 changed files with 0 additions and 89 deletions

View file

@ -532,8 +532,6 @@
},
"ext.visualEditor.mediawiki.mobile": {
"scripts": [
"modules/ve-mw/ui/ve.ui.MWMobileContext.js",
"modules/ve-mw/ui/ve.ui.MWMobileSurface.js",
"modules/ve-mw/ui/dialogs/ve.ui.MWMobileSaveDialog.js",
"modules/ve-mw/ui/tools/ve.ui.MWMobileLinkInspectorTool.js"
],

View file

@ -1,56 +0,0 @@
/*!
* VisualEditor UserInterface MobileContext class.
*
* @copyright 2011-2017 VisualEditor Team and others; see http://ve.mit-license.org
*/
/**
* UserInterface context that displays inspector full screen.
*
* @class
* @extends ve.ui.MobileContext
*
* @constructor
* @param {ve.ui.Surface} surface
* @param {Object} [config] Configuration options
*/
ve.ui.MWMobileContext = function VeUiMWMobileContext() {
// Parent constructor
ve.ui.MWMobileContext.super.apply( this, arguments );
// Initialization
this.$element.addClass( 've-ui-mwMobileContext' );
};
/* Inheritance */
OO.inheritClass( ve.ui.MWMobileContext, ve.ui.MobileContext );
/* Methods */
/**
* @inheritdoc
*/
ve.ui.MWMobileContext.prototype.getRelatedSources = function () {
var sources;
if ( !this.relatedSources ) {
sources = ve.ui.MobileContext.super.prototype.getRelatedSources.call( this );
// Filter out sources not supported in mobile mode
// FIXME: This is a temporary hack. Ideally, we don't want to load any code
// that is not supported on a given platform. However, present implementation
// of citation dialog forces us to load sources that we don't want on mobile.
this.availableSources = sources.filter( function ( source ) {
return (
source.model instanceof ve.dm.LinkAnnotation ||
(
source.model instanceof ve.dm.MWReferenceNode &&
source.tool !== ve.ui.MWReferenceDialogTool
)
);
} );
}
return this.availableSources;
};

View file

@ -1,31 +0,0 @@
/*!
* VisualEditor UserInterface MediaWiki MobileSurface class.
*
* @copyright 2011-2017 VisualEditor Team and others; see http://ve.mit-license.org
*/
/**
* @class
* @extends ve.ui.Surface
*
* @constructor
* @param {HTMLDocument|Array|ve.dm.LinearData|ve.dm.Document} dataOrDoc Document data to edit
* @param {Object} [config] Configuration options
*/
ve.ui.MWMobileSurface = function VeUiMWMobileSurface() {
// Parent constructor
ve.ui.MWMobileSurface.super.apply( this, arguments );
};
/* Inheritance */
OO.inheritClass( ve.ui.MWMobileSurface, ve.ui.Surface );
/* Methods */
/**
* @inheritdoc
*/
ve.ui.MWMobileSurface.prototype.createContext = function () {
return new ve.ui.MWMobileContext( this );
};