mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-16 19:09:29 +00:00
4192cbc4d5
Changes: * Cleanup the window API to use more consistent and intuitive methods - we now use initialize/setup/teardown instead of initialize/onSetup/onOpen/onClose as methods which are overridden, and use open/close methods to control the window * Change events around to have opening/open and closing/close events which act as before/after points during the opening/closing process * Make WindowSet and Context respond to windows being opened, rather than opening them directly * Fix a LinkInspector creation mode bug where the initial text doesn't get reset * Move inspector, a VisualEditor concept, back to VE * Cleanup naming of SurfaceDialog, SurfaceToolbar, etc. to use shorter names, they were given Surface* names when the generic ones were also in VE, but now the generic ones are in OO, so they can return to their original names Change-Id: I82c4fed8bcb3fb5630938c8bc4dd9b2d5f1a8c1d
59 lines
1.5 KiB
JavaScript
59 lines
1.5 KiB
JavaScript
/*!
|
|
* VisualEditor UserInterface MWAlienExtensionInspector class.
|
|
*
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* MediaWiki alien extension inspector.
|
|
*
|
|
* @class
|
|
* @extends ve.ui.MWExtensionInspector
|
|
*
|
|
* @constructor
|
|
* @param {ve.ui.WindowSet} windowSet Window set this inspector is part of
|
|
* @param {Object} [config] Configuration options
|
|
*/
|
|
ve.ui.MWAlienExtensionInspector = function VeUiMWAlienExtensionInspector( windowSet, config ) {
|
|
// Parent constructor
|
|
ve.ui.MWExtensionInspector.call( this, windowSet, config );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
OO.inheritClass( ve.ui.MWAlienExtensionInspector, ve.ui.MWExtensionInspector );
|
|
|
|
/* Static properties */
|
|
|
|
ve.ui.MWAlienExtensionInspector.static.name = 'alienExtension';
|
|
|
|
ve.ui.MWAlienExtensionInspector.static.icon = 'alienextension';
|
|
|
|
ve.ui.MWAlienExtensionInspector.static.nodeView = ve.ce.MWAlienExtensionNode;
|
|
|
|
ve.ui.MWAlienExtensionInspector.static.nodeModel = ve.dm.MWAlienExtensionNode;
|
|
|
|
/* Methods */
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
ve.ui.MWAlienExtensionInspector.prototype.getTitle = function () {
|
|
return this.surface.getView().getFocusedNode().getModel().getExtensionName();
|
|
};
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
ve.ui.MWAlienExtensionInspector.prototype.initialize = function () {
|
|
// Parent method
|
|
ve.ui.MWExtensionInspector.prototype.initialize.call( this );
|
|
|
|
this.input.$element.addClass( 've-ui-mwAlienExtensionInspector-input' );
|
|
};
|
|
|
|
/* Registration */
|
|
|
|
ve.ui.inspectorFactory.register( ve.ui.MWAlienExtensionInspector );
|