mediawiki-extensions-Visual.../modules/ve/ui/tools/buttons/ve.ui.LanguageButtonTool.js
Moriel Schottlender 59079978ff Language Inspector UI
This is the language inspector UI engine with ULS core.
The Language Inspector works alongside ULS to choose and change language
blocks in text. The inspector was based on ve.ui.TextInputWidget and
now changed to inherit ve.ui.Widget and display details in a table
instead of an input textbox.

Added jQuery.ULS module:
* Repository: https://github.com/wikimedia/jquery.uls
* Latest Commit 728f112ffc90b03b50c0109487886a2647f12020
* Taken 'src' / 'images' and 'css' folders into modules/jquery.uls

Bug: 47759
Change-Id: I3c9fd6c135c05a54f6c7fc28c5962fc0a6677806
2013-07-29 00:38:59 -04:00

42 lines
1.1 KiB
JavaScript

/*!
* VisualEditor UserInterface LanguageButtonTool class.
*
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* UserInterface language button tool.
*
* @class
* @extends ve.ui.InspectorButtonTool
* @constructor
* @param {ve.ui.Toolbar} toolbar
* @param {Object} [config] Config options
*/
ve.ui.LanguageButtonTool = function VeUiLanguageButtonTool( toolbar, config ) {
// Parent constructor
ve.ui.InspectorButtonTool.call( this, toolbar, config );
};
/* Inheritance */
ve.inheritClass( ve.ui.LanguageButtonTool, ve.ui.InspectorButtonTool );
/* Static Properties */
ve.ui.LanguageButtonTool.static.name = 'language';
ve.ui.LanguageButtonTool.static.icon = 'language';
ve.ui.LanguageButtonTool.static.titleMessage = 'visualeditor-annotationbutton-language-tooltip';
ve.ui.LanguageButtonTool.static.inspector = 'language';
ve.ui.LanguageButtonTool.static.modelClasses = [ ve.dm.LanguageAnnotation ];
/* Registration */
ve.ui.toolFactory.register( 'language', ve.ui.LanguageButtonTool );
ve.ui.commandRegistry.register( 'language', 'inspector', 'open', 'language' );