mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-26 15:21:51 +00:00
a3295f0939
Objectives: * Hamburger menu in actions area of toolbar * Add tools that open specific pages in the meta dialog * Fix support for using setPage in ve.ui.PagedOutlineLayout * Allow passing setup config objects through window open calls * Add dialog action, similar to inspector action * Fix incorrect or missing documentation Change-Id: I2d2c9b87554fb2a0c90ed6944a58b38a37efa712
53 lines
1.1 KiB
JavaScript
53 lines
1.1 KiB
JavaScript
/*!
|
|
* VisualEditor UserInterface InspectorAction class.
|
|
*
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* Inspector action.
|
|
*
|
|
* @class
|
|
* @extends ve.ui.Action
|
|
* @constructor
|
|
* @param {ve.ui.Surface} surface Surface to act on
|
|
*/
|
|
ve.ui.InspectorAction = function VeUiInspectorAction( surface ) {
|
|
// Parent constructor
|
|
ve.ui.Action.call( this, surface );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
OO.inheritClass( ve.ui.InspectorAction, ve.ui.Action );
|
|
|
|
/* Static Properties */
|
|
|
|
ve.ui.InspectorAction.static.name = 'inspector';
|
|
|
|
/**
|
|
* List of allowed methods for the action.
|
|
*
|
|
* @static
|
|
* @property
|
|
*/
|
|
ve.ui.InspectorAction.static.methods = [ 'open' ];
|
|
|
|
/* Methods */
|
|
|
|
/**
|
|
* Open an inspector.
|
|
*
|
|
* @method
|
|
* @param {string} name Symbolic name of inspector to open
|
|
* @param {Object} [config] Configuration options for inspector setup
|
|
*/
|
|
ve.ui.InspectorAction.prototype.open = function ( name, config ) {
|
|
this.surface.getContext().openInspector( name, config );
|
|
};
|
|
|
|
/* Registration */
|
|
|
|
ve.ui.actionFactory.register( ve.ui.InspectorAction );
|