diff --git a/modules/ve-mw/ui/layouts/ve.ui.MWTwoPaneTransclusionDialogLayout.js b/modules/ve-mw/ui/layouts/ve.ui.MWTwoPaneTransclusionDialogLayout.js index d5b9116ff3..a5e9fbd7d9 100644 --- a/modules/ve-mw/ui/layouts/ve.ui.MWTwoPaneTransclusionDialogLayout.js +++ b/modules/ve-mw/ui/layouts/ve.ui.MWTwoPaneTransclusionDialogLayout.js @@ -74,7 +74,7 @@ OO.inheritClass( ve.ui.MWTwoPaneTransclusionDialogLayout, OO.ui.MenuLayout ); /** * @private - * @param {Object} visibility + * @param {Object.} visibility */ ve.ui.MWTwoPaneTransclusionDialogLayout.prototype.onFilterPagesByName = function ( visibility ) { for ( var pageName in visibility ) { @@ -150,7 +150,7 @@ ve.ui.MWTwoPaneTransclusionDialogLayout.prototype.focusPart = function ( pageNam * Parts and parameters can be soft-selected, or selected and focused. * * @param {string|null} pageName Full, unique name of part or parameter, or null to deselect - * @param {string} [soft] If true, suppress content pane focus. + * @param {boolean} [soft] If true, suppress content pane focus. */ ve.ui.MWTwoPaneTransclusionDialogLayout.prototype.onSidebarItemSelected = function ( pageName, soft ) { this.setPage( pageName ); diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineParameterSelectWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineParameterSelectWidget.js index ce19a58be0..880fcd218e 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineParameterSelectWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineParameterSelectWidget.js @@ -12,6 +12,7 @@ * @constructor * @param {Object} config * @cfg {ve.ui.MWTransclusionOutlineParameterWidget[]} items + * @property {string|null} itemSet Name of the currently selected parameter */ ve.ui.MWTransclusionOutlineParameterSelectWidget = function VeUiMWTransclusionOutlineParameterSelectWidget( config ) { // Parent constructor diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineParameterWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineParameterWidget.js index cb68e64ca3..1f1099cc37 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineParameterWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineParameterWidget.js @@ -1,9 +1,3 @@ -/*! - * VisualEditor user interface MWTransclusionOutlineParameterWidget class. - * - * @license The MIT License (MIT); see LICENSE.txt - */ - /** * A widget that represents a template parameter, with a checkbox to add/remove the parameter. * Modelled after {@see OO.ui.OutlineOptionWidget}. Also see {@see OO.ui.CheckboxMultioptionWidget} @@ -79,6 +73,9 @@ ve.ui.MWTransclusionOutlineParameterWidget.prototype.setSelected = function ( st return this; }; +/** + * @param {boolean} state + */ ve.ui.MWTransclusionOutlineParameterWidget.prototype.setParameter = function ( state ) { this.$element.toggleClass( 've-ui-mwTransclusionOutlineParameterWidget-isSet', state ); }; diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineTemplateWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineTemplateWidget.js index ee8bbd1c7c..7fa04d3a1a 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineTemplateWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineTemplateWidget.js @@ -1,7 +1,3 @@ -/*! - * @license The MIT License (MIT); see LICENSE.txt - */ - /** * Container for a template as rendered in the template dialog sidebar. * Contains search and visibility inputs, and a list of parameters when available. @@ -450,7 +446,7 @@ ve.ui.MWTransclusionOutlineTemplateWidget.prototype.filterParameters = function /** * @private * @param {boolean} visibility - * @param {boolean} fromClick + * @param {boolean} [fromClick] */ ve.ui.MWTransclusionOutlineTemplateWidget.prototype.onToggleUnusedFields = function ( visibility, fromClick ) { if ( visibility ) { diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineToggleUnusedWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineToggleUnusedWidget.js index 84a5043815..f20346cb99 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineToggleUnusedWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineToggleUnusedWidget.js @@ -33,6 +33,8 @@ OO.inheritClass( ve.ui.MWTransclusionOutlineToggleUnusedWidget, OO.ui.ButtonWidg /** * @event toggleUnusedFields + * @param {boolean} visibility If unused fields should be shown or not. + * @param {boolean} [fromClick] * Emitted when the visibility for unused fields should be (re)applied. */ diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineWidget.js index 88557df515..b4d0aa8475 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineWidget.js @@ -1,9 +1,3 @@ -/*! - * VisualEditor user interface MWTransclusionOutlineWidget class. - * - * @license The MIT License (MIT); see LICENSE.txt - */ - /** * Container for the entire transclusion dialog sidebar, may contain a single or * multiple templates or raw wikitext snippets. @@ -43,7 +37,7 @@ OO.inheritClass( ve.ui.MWTransclusionOutlineWidget, OO.ui.Widget ); * @event sidebarPartSelected * @param {string} pageName Unique id of the {@see OO.ui.BookletLayout} page, e.g. something like * "part_1" or "part_1/param1". - * @param {string} [soft] If true, don't focus the content pane. Defaults to false. + * @param {boolean} [soft] If true, don't focus the content pane. Defaults to false. */ /* Methods */ @@ -65,7 +59,7 @@ ve.ui.MWTransclusionOutlineWidget.prototype.onReplacePart = function ( removed, /** * Handle spacebar in a part header * - * @param {*} pageName + * @param {string} pageName * @fires sidebarPartSelected */ ve.ui.MWTransclusionOutlineWidget.prototype.onTransclusionPartSoftSelected = function ( pageName ) { @@ -100,7 +94,6 @@ ve.ui.MWTransclusionOutlineWidget.prototype.addPartWidget = function ( part, new if ( part instanceof ve.dm.MWTemplateModel ) { widget = new ve.ui.MWTransclusionOutlineTemplateWidget( part, removed instanceof ve.dm.MWTemplatePlaceholderModel ); // This forwards events from the nested ve.ui.MWTransclusionOutlineTemplateWidget upwards. - // The array syntax is a way to call `this.emit( 'filterParameters' )`. widget.connect( this, { // We can forward these events as is. The parameter's unique ids are reused as page // names in {@see ve.ui.MWTemplateDialog.onAddParameter}. @@ -204,10 +197,10 @@ ve.ui.MWTransclusionOutlineWidget.prototype.clear = function () { /** * @private - * - * @param {Object} parameter + * @param {Object.} visibility + * @fires filterPagesByName */ -ve.ui.MWTransclusionOutlineWidget.prototype.onFilterParametersByName = function ( parameter ) { - this.emit( 'filterPagesByName', parameter ); +ve.ui.MWTransclusionOutlineWidget.prototype.onFilterParametersByName = function ( visibility ) { + this.emit( 'filterPagesByName', visibility ); this.setSelectionByPageName(); };