/*! * MediaWiki Widgets - TagMultiselectWidget class. * * @copyright 2017 MediaWiki Widgets Team and others; see AUTHORS.txt * @license The MIT License (MIT); see LICENSE.txt */ ( function () { /** * @classdesc Input list of tags in a single line. * * This extends TagMultiselectWidget by adding an invisible textarea * element which will be used to submit the values of the tags * * If used inside HTML form the results will be sent as the list of * newline-separated tags. * * @class * @extends OO.ui.TagMultiselectWidget * * @constructor * @description Create an instance of `mw.widgets.TagMultiselectWidget`. * @param {Object} [config] Configuration options * @param {string} [config.name] Name of input to submit results (when used in HTML forms) */ mw.widgets.TagMultiselectWidget = function MwWidgetsTagMultiselectWidget( config ) { // Parent constructor mw.widgets.TagMultiselectWidget.super.call( this, Object.assign( {}, config, {} ) ); if ( 'name' in config ) { // Use this instead of , because hidden inputs do not have separate // 'value' and 'defaultValue' properties. this.$hiddenInput = $( '