mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
af9cf9b2ff
Change-Id: Ie7a824a4f145d039b45fe60afbc7fe2a382c5e2d
37 lines
864 B
JavaScript
37 lines
864 B
JavaScript
/*!
|
|
* VisualEditor UserInterface MWLanguageSearchWidget class.
|
|
*
|
|
* @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/*global mw */
|
|
|
|
/**
|
|
* Creates an ve.ui.MWLanguageSearchWidget object.
|
|
*
|
|
* @class
|
|
* @extends ve.ui.LanguageSearchWidget
|
|
*
|
|
* @constructor
|
|
* @param {Object} [config] Configuration options
|
|
*/
|
|
ve.ui.MWLanguageSearchWidget = function VeUiMWLanguageSearchWidget( config ) {
|
|
// Parent constructor
|
|
ve.ui.LanguageSearchWidget.call( this, config );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
OO.inheritClass( ve.ui.MWLanguageSearchWidget, ve.ui.LanguageSearchWidget );
|
|
|
|
/* Methods */
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
ve.ui.MWLanguageSearchWidget.prototype.getLanguages = function () {
|
|
return mw.language.getData( mw.config.get( 'wgUserLanguage' ), 'languageNames' ) ||
|
|
$.uls.data.getAutonyms();
|
|
};
|