diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlinePartWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlinePartWidget.js index 467bf33e0b..5f9017f82e 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlinePartWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlinePartWidget.js @@ -33,8 +33,8 @@ ve.ui.MWTransclusionOutlinePartWidget = function VeUiMWTransclusionOutlinePartWi this.header = new ve.ui.MWTransclusionOutlineButtonWidget( config ) .connect( this, { keyPressed: 'onHeaderKeyPressed', - // The array syntax is a way to call `this.emit( 'transclusionPartSelected', … )`. - click: [ 'emit', 'transclusionPartSelected', part.getId() ] + // The array syntax is a way to call `this.emit( 'transclusionOutlineItemSelected', … )`. + click: [ 'emit', 'transclusionOutlineItemSelected', part.getId() ] } ); if ( config.ariaDescriptionUnselected ) { @@ -81,11 +81,14 @@ OO.inheritClass( ve.ui.MWTransclusionOutlinePartWidget, OO.ui.Widget ); */ /** - * "Hard" selection with enter or mouse click. + * Triggered when the user interacts with any sidebar element in a meaningful way, and that should + * be reflected in the content pane of the dialog. This includes e.g. selecting something that was + * already selected. * - * @event transclusionPartSelected + * @event transclusionOutlineItemSelected * @param {string} pageName Unique id of the {@see OO.ui.BookletLayout} page, e.g. something like * "part_1" or "part_1/param1". + * @param {boolean} [soft] If true, focus should stay in the sidebar. Defaults to false. */ /* Methods */ diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineTemplateWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineTemplateWidget.js index 7822e3eafb..b3744de110 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineTemplateWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineTemplateWidget.js @@ -58,13 +58,6 @@ OO.inheritClass( ve.ui.MWTransclusionOutlineTemplateWidget, ve.ui.MWTransclusion /* Events */ -/** - * @event transclusionOutlineItemSelected - * @param {string} pageName Unique id of the {@see OO.ui.BookletLayout} page, e.g. something like - * "part_1" or "part_1/param1". - * @param {boolean} [soft] If true, focus should stay in the sidebar. Defaults to false. - */ - /** * Triggered when the user uses the search widget at the top to filter the list of parameters. * diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineWidget.js index ecb8919bd7..6c5f877b67 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineWidget.js @@ -97,7 +97,6 @@ ve.ui.MWTransclusionOutlineWidget.prototype.addPartWidget = function ( part, new 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}. - transclusionOutlineItemSelected: [ 'emit', 'sidebarItemSelected' ], filterParametersById: 'onFilterParametersByName' } ); } else if ( part instanceof ve.dm.MWTemplatePlaceholderModel ) { @@ -108,7 +107,7 @@ ve.ui.MWTransclusionOutlineWidget.prototype.addPartWidget = function ( part, new widget.connect( this, { transclusionPartSoftSelected: 'onTransclusionPartSoftSelected', - transclusionPartSelected: [ 'emit', 'sidebarItemSelected' ] + transclusionOutlineItemSelected: [ 'emit', 'sidebarItemSelected' ] } ); this.partWidgets[ part.getId() ] = widget;