2014-04-08 19:15:15 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor UserInterface MWNoParametersResultWidget class.
|
|
|
|
*
|
2020-01-08 17:13:04 +00:00
|
|
|
* @copyright 2011-2020 VisualEditor Team and others; see AUTHORS.txt
|
2014-04-08 19:15:15 +00:00
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates an ve.ui.MWNoParametersResultWidget object.
|
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @extends OO.ui.OptionWidget
|
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
* @param {Object} [config] Configuration options
|
|
|
|
*/
|
2014-11-22 01:40:00 +00:00
|
|
|
ve.ui.MWNoParametersResultWidget = function VeUiMWNoParametersResultWidget( config ) {
|
2014-04-08 19:15:15 +00:00
|
|
|
// Parent constructor
|
2016-08-22 21:44:59 +00:00
|
|
|
ve.ui.MWNoParametersResultWidget.super.call( this, config );
|
2014-04-08 19:15:15 +00:00
|
|
|
|
|
|
|
// Initialization
|
|
|
|
this.$element.addClass( 've-ui-mwNoParametersResultWidget' );
|
|
|
|
this.setLabel( this.buildLabel() );
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
OO.inheritClass( ve.ui.MWNoParametersResultWidget, OO.ui.OptionWidget );
|
|
|
|
|
|
|
|
/* Methods */
|
|
|
|
|
2019-04-16 15:17:29 +00:00
|
|
|
/**
|
|
|
|
* Build the label element
|
|
|
|
*
|
2021-09-17 09:29:50 +00:00
|
|
|
* @private
|
2019-04-16 15:17:29 +00:00
|
|
|
* @return {jQuery}
|
|
|
|
*/
|
2014-04-08 19:15:15 +00:00
|
|
|
ve.ui.MWNoParametersResultWidget.prototype.buildLabel = function () {
|
2015-04-09 23:47:15 +00:00
|
|
|
return $( '<div>' )
|
2014-04-08 19:15:15 +00:00
|
|
|
.addClass( 've-ui-mwNoParametersResultWidget-label' )
|
|
|
|
.text( ve.msg( 'visualeditor-parameter-search-no-unused' ) );
|
|
|
|
};
|