mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 06:24:08 +00:00
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:
parent
1ae5c13cb9
commit
e5555d6d85
|
@ -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"
|
||||
],
|
||||
|
|
|
@ -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;
|
||||
};
|
|
@ -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 );
|
||||
};
|
Loading…
Reference in a new issue