blob: 28293467216a29a885247197e87874e46bbd424a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
/*!
* MediaWiki Widgets - NamespacesMenuOptionWidget class.
*
* @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
( function () {
/**
* @classdesc Returns an item match text that includes both the label
* and the data, so the menu can filter on either.
*
* @class
* @extends OO.ui.MenuOptionWidget
*
* @constructor
* @description Create an mw.widgets.NamespacesMenuOptionWidget object.
* @param {Object} [config] Configuration options
*/
mw.widgets.NamespacesMenuOptionWidget = function MwWidgetsNamespacesMenuOptionWidget( config ) {
// Parent
mw.widgets.NamespacesMenuOptionWidget.super.call( this, config );
};
/* Setup */
OO.inheritClass( mw.widgets.NamespacesMenuOptionWidget, OO.ui.MenuOptionWidget );
/**
* @inheritdoc
*/
mw.widgets.NamespacesMenuOptionWidget.prototype.getMatchText = function () {
return this.getData() + ' ' + this.getLabel();
};
}() );
|