Debian Codegraph @

resources/src/mediawiki.special.apisandbox/ParamLabelWidget.js

raw symbols SCIP
1 /**
2 * A wrapper for OO.ui.LabelWidget
3 *
4 * @class
5 * @private
6 * @constructor
7 */
8 function ParamLabelWidget() {
9 ParamLabelWidget.super.call(
10 this,
11 { classes: [ 'oo-ui-inline-help' ] }
12 );
13 }
14
15 OO.inheritClass( ParamLabelWidget, OO.ui.LabelWidget );
16
17 /**
18 * @param {jQuery} $description
19 */
20 ParamLabelWidget.prototype.addDescription = function ( $description ) {
21 this.$element.append(
22 $( '<div>' ).addClass( 'description' ).append( $description )
23 );
24 };
25
26 /**
27 * @param {jQuery} $info
28 */
29 ParamLabelWidget.prototype.addInfo = function ( $info ) {
30 this.$element.append(
31 $( '<div>' ).addClass( 'info' ).append( $info )
32 );
33 };
34
35 module.exports = ParamLabelWidget;